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 MS SQL Offline Database Online

What is an Online Rebuilding of Indexes in SQL Server ?

What are Some Advantages of Using CTE in SQL Server ?

What is the Difference Between Clustered and a Non-clustered Inde ...

Showing Server Active Server Name in MS SQL