syscolumns (all databases)

For SQL Server 6.5 information, see syscolumns System Table in What's New for SQL Server 6.5.

Contains one row for every column in every table and view, and a row for each parameter in a stored procedure.

Column Datatype Description
id int ID of the table to which this column belongs or of the stored procedure with which this parameter is associated.
number smallint Subprocedure number when the procedure is grouped (0 for nonprocedure entries).
colid tinyint Column ID.
status tinyint Bitmap used to describe a property of the column or the parameter:
0x08 The column allows null values.
0x40 The parameter is an OUTPUT parameter.
0x80 The column is an identity column.
type tinyint Physical storage type; copied from systypes.
length tinyint Physical length of data; copied from systypes or supplied by the user.
offset smallint Offset into the row where this column appears; if negative, variable-length column.
usertype smallint User type ID; copied from systypes.
cdefault int ID of the stored procedure that generates the default value for this column.
domain int ID of the stored procedure that contains the rule for this column.
name varchar(30) Column name.
printfmt varchar(255) Reserved.
prec tinyint Level of precision for this column.
scale tinyint Scale for this column.

Index

syscolumns clustered, unique on id, number, colid

Referenced by Stored Procedures

sp_articlecolumn sp_help sp_special_columns
sp_bindefault sp_helparticle sp_sproc_columns
sp_bindrule sp_helparticlecolumns sp_statistics
sp_column_privileges sp_helprotect sp_tables
sp_columns sp_pkeys sp_unbindefault
sp_droptype sp_rename sp_unbindrule
sp_fkeys