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
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Delete all records

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-02-19 : 09:27:18
I. Meijer writes "What's the easiest way to delete all the records in all the tables in the database?"

JustinBigelow
SQL Gigolo

1157 Posts

Posted - 2002-02-19 : 09:34:04
How about...

Script out the tables.
Drop the database.
Recreate the database.
Run the scripts to recreate the tables.

or

Use "sp_msforeachtable" with "truncate table"

Justin

Go to Top of Page
   

- Advertisement -