Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Script alter table all tables in database
Message
 
 
To
10/09/2006 17:31:21
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Environment versions
SQL Server:
SQL Server 2005
Miscellaneous
Thread ID:
01152672
Message ID:
01152674
Views:
16
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--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform