Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Fastest way to drop all tables
Message
 
À
27/02/2008 06:40:18
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Import/Export
Divers
Thread ID:
01296633
Message ID:
01296775
Vues:
8
>>>>>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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform