Languages table:
HowdoIselecttheColumnNamesofthistable?
Theresultwouldbe:
"IDIdioma", "Sigla" and "IDioma".
Another way to get the column names of some table is by using sys.columns using the object_id () function that gets the name of the table / view and returns its internal id. / p>
This works from SQL Server 2008
SELECT * FROM sys.columns WHERE object_id = object_id('nome_tabela')
Make a select in INFORMATION_SCHEMA.COLUMNS
asking for the COLUMN_NAME
column. In INFORMATION_SCHEMA.COLUMNS
you have information about all the columns for all the tables in a database schema.
SELECT COLUMN_NAME
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_NAME = 'NomedaTabela'