Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Fastest way to drop all tables
Message
 
To
27/02/2008 06:40:18
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Microsoft SQL Server
Category:
Import/Export
Miscellaneous
Thread ID:
01296633
Message ID:
01296775
Views:
7
>>>>>You could use sp_MSForEachTable:
>>>>>
>>>>>USE YourDataBase
>>>>>sp_MsForEachTable 'DROP TABLE ?'
>>>>>
>>>>
>>>>Should I just type the 2nd line as is in the Query window? The database is already the default. When I tried that, it says "Could not find stored procedure 'sp_MsforEachTable'.
>>>
>>>It exists in SQL2005 and later, probably you're using 2000.
>>>I think just adding a "if exists ... Drop Table" line before each create would do it just fine.
>>>Cetin
>>
>>It is in SQL Server 2000 also.
>
>I didn't know that! My rating to you (if I knew a way to do:)
>Cetin

This is enough :-)
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Reply
Map
View

Click here to load this message in the networking platform