Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Optimize query to get one record
Message
From
22/04/2010 02:33:55
 
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Environment versions
SQL Server:
SQL Server 2008
Application:
Web
Miscellaneous
Thread ID:
01461424
Message ID:
01461429
Views:
43
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform