MSSQL: Finding out column names for a table
Database
2
Posts
1
Posters
0
Views
1
Watching
-
Hi, I need a select query to get the column names of a table in the database.. basically, what I'm trying to do is: IF NOT EXISTS (SELECT * FROM TableColumns WHERE Column = 'missingcolumn' AND Table = 'Tab') ALTER TABLE Tab ADD missingcolumn [...] I just need the correct select query. Thanks :)
-
Hi, I need a select query to get the column names of a table in the database.. basically, what I'm trying to do is: IF NOT EXISTS (SELECT * FROM TableColumns WHERE Column = 'missingcolumn' AND Table = 'Tab') ALTER TABLE Tab ADD missingcolumn [...] I just need the correct select query. Thanks :)