Search This Blog

Friday, November 22, 2013

sp_columns SQL Server example

SQL Server > System Stored Procedures   > sp_columns

sp_columns returns column information for the specified object

Example

create table tmp_Sales(ProductId int, [Year] int, Country varchar(100))
EXEC sp_columns @table_name = N'tmp_Sales'
drop table tmp_Sales

Result: