find all columns in table in sql server code example
Example 1: sql server find columns list in tables
SELECT *
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_NAME = N'DIM_VENDING_MATERIALS'
Example 2: get all columns from table sql
/* To retreive the column names of table using sql */
SELECT COLUMN_NAME.
FROM INFORMATION_SCHEMA. COLUMNS.
WHERE TABLE_NAME = 'Your Table Name'
Example 3: get all columns from table sql
SELECT
TABLE_NAME
FROM
INFORMATION_SCHEMA.TABLES