sql server - Check if set of rows fall in specific values in SQL? -


i want check if given table has specific column names, want return true if has them , if 1 column name doesn't exist want return false, query :

select column_name db.information_schema.columns table_name = 'mytable' 

i want check if these names in query result: ('updateddate', 'createddate', 'updatedby')

if know count of list query you

select count(column_name) db.information_schema.columns table_name = 'mytable' , column_name in ('updateddate', 'createddate', 'updatedby') group column_name having count(column_name) = 3; 

Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -