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

What is RAISEERROR in SQL Server ?

What are The Different Backup Options With SQL Server ?

What is the Maximum Size per Database for SQL Server Express ?

What are OFFLINE Datafiles with SQL Server ?

What is The Concept of Piecemeal Restore on SQL Server ?