Obtenha o nome da coluna SQL Server
SELECT *
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_NAME = N'Customers'
Joyous Jackal
SELECT *
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_NAME = N'Customers'
SELECT *
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_NAME = N'Customers'
-- INFORMATION_SCHEMA is an ANSI-standard (American National Standard Institute) set of read-only views which provide information about all of the tables, views, columns, and procedures in a database
-- "N" defines the subsequent string (the string after the N) as being in unicode
SELECT COLUMN_NAME
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_NAME = 'Your Table Name'
ORDER BY COLUMN_NAME
-- IS_NULLABLE returns yes or no depending on null or not null
/* How to select the column names in SQL*/
SELECT Column_name
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_NAME = N'your_table_name'
/* Just change the "your_table_name" ↑ to the name of your table */
DESCRIBE Table_Name;
OR
DESC Table_Name;