Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Optimize query to get one record
Message
De
22/04/2010 02:33:55
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 2008
Application:
Web
Divers
Thread ID:
01461424
Message ID:
01461429
Vues:
42
>But the presence of the field you can get with:
>
>IF NOT EXISTS(SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS
>                     WHERE Table_Name = 'YourTable' AND
>                           Column_Name = 'TheColumnYouWantToCheck')
>   -- Column did not exists
>ELSE
>   -- The column is here
>
Thanks
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
Répondre
Fil
Voir

Click here to load this message in the networking platform