HomeSQL ServerHow to return the column names from a table in SQL Server ?

How to return the column names from a table in SQL Server ?

You can easily return all the column names of a table in SQL Server 2008 using the sp_columns stored procedure.

How to return the column names from a table in SQL Server ?

Use AdventureWorks2014
GO
exec sp_columns ‘Employee’

Leave a Reply

You May Also Like

When dealing with a relational database management system (RDBMS) like SQL Server, compatibility level is an important concept to understand....
In this blog post, let’s learn about the error message “49975 – Unable to load controller client certificate due to...
In this blog post, let’s learn about the error message “49973 – Cannot remove tempdb remote file to local tempdb...