To check if a column exists in MSSQL you can use the following snippet.
Sample MSSQL
SELECT name FROM sys.columns WHERE object_id = OBJECT_ID('Pricetable') AND name='Price'
All the Code Snippets and Samples you need
To check if a column exists in MSSQL you can use the following snippet.
SELECT name FROM sys.columns WHERE object_id = OBJECT_ID('Pricetable') AND name='Price'
You must be logged in to post a comment.
RT @CodeSnippetsNET: Check if a column exists in #MSSQL http://t.co/om83qldAsl #SQL #coding #dev #programming