Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Script alter table all tables in database
Message
 
 
À
10/09/2006 17:31:21
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 2005
Divers
Thread ID:
01152672
Message ID:
01152674
Vues:
17
You can use undocumented sp_MSforeachtable
EXEC sp_MSforeachtable @command1="ALTER TABLE ? ..."
>Not quite clear on proper syntax for a script to add a timestamp field to all tables in a database.
>
>( working on my vfpdata to sql upsizer )
>
>I can figure out the single table script from just generating a change script, but not sure
>about the loop. Guidance appreciated.
>
>TIA
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform