Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Fastest way to drop all tables
Message
De
27/02/2008 11:50:10
 
 
À
27/02/2008 05:26:35
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Import/Export
Divers
Thread ID:
01296633
Message ID:
01296911
Vues:
9
>sp_MsForEachTable is hidden SP stored in master DB.
>
>This works for me :
>
>CREATE DATABASE Test
>GO
>USE Test
>GO
>CREATE TABLE Tbl1 (Fld1 int)
>CREATE TABLE Tbl2 (Fld1 int)
>CREATE TABLE Tbl3 (Fld1 int)
>GO
>sp_MsForEachTable 'DROP TABLE ?'
>
>Maybe you sholud try it with EXEC:
>
>EXEC sp_MsForEachTable 'DROP TABLE ?'
>
This doesn't work for me. I always have the error saying that the stored procedure is not found.

I have tried your code as is. The exact message is:

Msg 2812, Level 16, State 62, Line 1
Cound not find stored procedure 'sp_MsForEachTable'.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform