Tuesday, April 19, 2011

execute some sql for each table in SQLServer

for example, to drop all tables in a database:

EXEC sp_MSforeachtable @command1= 'drop Table ?'

No comments:

Post a Comment