Contains entries for each view, rule, default, trigger, CHECK constraint, DEFAULT constraint, and stored procedure. The text field contains the original SQL definition statements. Since text is often longer than 255 characters, entries often span rows. Each object can occupy as many as 255 rows.
Column | Datatype | Description |
---|---|---|
id | int | Object ID to which this text applies. |
number | smallint | Number within procedure grouping, if grouped. 0 for nonprocedure entries. |
colid | tinyint | Row sequence number for object definitions longer than 255 characters. |
texttype | smallint | 0 User-supplied comment (users can add entries that describe an object or column)
1 System-supplied comment (for views, rules,
4 Encrypted comments (applies to |
language | smallint | Reserved. |
text | varchar(255) | Actual text of the SQL definition statement. |
syscomments clustered, unique on id, number, colid, texttype
sp_helpconstraint | sp_helpextendedproc | sp_helptext |