Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 delete data from database

Author  Topic 

tpiazza55
Posting Yak Master

162 Posts

Posted - 2010-10-27 : 16:06:34
How would I loop through all the tables in a database and delete the data where the table name isnt AdminSetup

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2010-10-27 : 16:22:59
The script on the link below should get you started; you just need to modify it to skip table AdminSetup.

Truncate All Tables
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=65341





CODO ERGO SUM
Go to Top of Page

tpiazza55
Posting Yak Master

162 Posts

Posted - 2010-10-27 : 17:03:18
thanks so much
Go to Top of Page
   

- Advertisement -