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

Making a Backup of MS SQL Database With Query

Changing MS SQL Database Name with Query

Which TCP/IP Port Does the SQL Server Run On ?

What is the Difference Between a Local and a Global Temporary Tab ...

What is Central Management in SQL Server ?