Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Fastest way to drop all tables
Message
De
27/02/2008 04:51:27
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
27/02/2008 02:56:25
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Import/Export
Divers
Thread ID:
01296633
Message ID:
01296758
Vues:
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
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform