Skip to main content

%TSQL.sys.columns

Class %TSQL.sys.columns Extends %Persistent [ SqlRowIdPrivate, StorageStrategy = SQLStorage, System = 4 ]

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

Parameters

READONLY

Parameter READONLY = 1;

Properties

schema

Property schema As %String(MAXLEN = 128) [ SqlColumnNumber = 21 ];

Name of the schema the column resides in

parentobjname

Property parentobjname As %String(MAXLEN = 128) [ SqlColumnNumber = 22, SqlFieldName = parent_obj_name ];

Parent Object name Object name of the parent_obj.

name

Property name As %String(MAXLEN = 128) [ SqlColumnNumber = 12 ];

Name of the column or procedure parameter.

id

Property id As %Integer [ SqlColumnNumber = 2 ];

Object ID of the table to which this column belongs, or the ID of the stored procedure with which this parameter is associated.

length

Property length As %Integer [ SqlColumnNumber = 7 ];

Maximum physical storage length from systypes.

colid

Property colid As %SmallInt [ SqlColumnNumber = 4 ];

Column or parameter ID.

cdefault

Property cdefault As %Integer [ SqlColumnNumber = 10 ];

ID of the default for this column. ID of the procedure that generates default value for this column

number

Property number As %SmallInt [ InitialExpression = 0, SqlColumnNumber = 3 ];

Subprocedure number when the procedure is grouped (0 for nonprocedure entries).

status

Property status As %SmallInt [ SqlColumnNumber = 5 ];

Bitmap used to describe a property of the column or the parameter: Bits 0-2 (values 1, 2, and 4) indicate bit positioning if the column uses the bit datatype. If the column uses the text/image datatype, bits 0 and 1 indicate replication status as follows: 01 = always replicate 10 = replicate only if changed 00 = never replicate Bit 3 (value 8) indicates whether NULL values are legal in this column. Bit 4 (value 16) indicates whether more than one check constraint exists for the column. Bits 5 and 6 are used internally. Bit 7 (value 128) indicates an identity column. Bit 8 is unused.

usertype

Property usertype As %Library.String(MAXLEN = 256) [ SqlColumnNumber = 9 ];

ID of user-defined data type from systypes.

prec

Property prec As %SmallInt [ SqlColumnNumber = 14 ];

Level of precision for this column. Number of significant digits.

scale

Property scale As %Integer [ SqlColumnNumber = 15 ];

Scale for this column. Number of digits to the right of the decimal point