MS SQL Getting List of All Column Names of a Table

The following code should be run to get the list of all column names and data types of a specified table in MS SQL Server.

SELECT COLUMN_NAME, DATA_TYPE FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='{Your Table Name}';


You May Interest

How to Show Line Numbers in MS SQL Server ?

What are the INTERSECT Operators in SQL Server ?

What is the Difference Between UNION and UNION ALL in SQL Server ...

Differences Between Stored Procedure and Function in MS SQL

What is a Control Flow Inside SSIS ?