System functions return system information.
The following system functions are available:
The db_id, db_name, and datalength functions are implemented as built-in functions.
Some system functions are implemented as stored procedures.
System functions that are not described elsewhere are noted in the following table. These functions are implemented as stored procedures.
COL_LENGTH( @object_name, @column_name )
Returns the INTEGER defined length of the specified column. @object_name can contain the owner, for example, 'GROUPO.Customers'.
COL_NAME( @object_id, @column_id [, @database_id ] )
Returns the CHAR(128) column name.
INDEX_COL ( @table_name, @index_id, @key_# [, @user_id ] )
Returns the CHAR(128) name of the indexed column. @table_name can contain the owner, for example, 'GROUPO.Customers'.
OBJECT_ID( @object_name )
Returns the INTEGER object ID. @object_name can contain the owner, for example, 'GROUPO.Customers'.
OBJECT_NAME ( @object_id [, @database_id ] )
Returns the CHAR(128) object name.