In SQL Server, the system-defined stored procedure sp_columns returns column information for the specified objects that can be queried in the database.
sp_columns syntax
sp_columns [ @table_name = 'Object name.' ] ,
[ @table_owner = 'The database user who created the table.' ] ,
[ @table_qualifier = 'Database name.' ] ,
[ @column_name = 'Column name.' ] ,
[ @ODBCVer = 'ODBC Version 2 or 3.' ] ;
Example
USE model;
GO
EXEC sp_columns
@table_name = 'students',
@table_owner = 'dbo';