Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Object
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Maintenance bases de données
Titre:
Re: Object
Divers
Thread ID:
00975053
Message ID:
00975311
Vues:
13
>Hi All:
> How can I check if a table exist and if id does I want to drop that table?
>Thanks
>ZA

Check Books On Line (BOL) and search for SQL-DMO or SQLDMO. I'm assuming here that you've got the Enterprise Manager installed.

If not, and you're using VFP, then look at SQLTABLES() in the VFP help. This will return all the tables or all the non-system tables, depending on the parameters. From there, you can use SQLEXEC() (after, of course, establishing a handle via SQLSTRINGCONNECT() or SQLCONNECT()) to pass a DROP TABLE... string.

Finally, you could use the IF EXISTS...function TSQL to do this.
George

Ubi caritas et amor, deus ibi est
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform