Contents Index String functions Text and image functions

ASA SQL Reference
  SQL Functions
    Function types

System functions


System functions return system information.

List of functions 

The following system functions are available:

Compatibility 

The following table displays the Adaptive Server Enterprise system functions and their status in Adaptive Server Anywhere:

Function Status
Col_length
Implemented
Col_name
Implemented
Curunreservedpgs
Not implemented
Data_pgs
Not implemented
Datalength
Implemented
Db_id
Implemented
Db_name
Implemented
Host_id
Not implemented
Host_name
Not implemented
Index_col
Implemented
Lct_admin
Not implemented
Object_id
Implemented
Object_name
Implemented
Proc_role
Always returns 0
Reserved_pgs
Not implemented
Rowcnt
Not implemented
Show_role
Always returns NULL
Suser_id
Implemented
Suser_name
Implemented
Tsequal
Implemented
Used_pgs
Not implemented
User_id
Implemented
User_name
Implemented
Valid_name
Not implemented
Valid_user
Not implemented
Notes 

The implemented system functions are described in the following table.

System function Description
Col_length( table-name, column-name )
Returns the defined length of column
Col_name( table-id, column-id [, database-id] )
Returns the column name
Datalength( expression )
Returns the length of the expression, in bytes
Db_id( [ database-name ] )
Returns the database ID number
Db_name( [ database-id ] )
Returns the database name
Index_col (table-name, index-id, key_# [, userid] )
Returns the name of the indexed column
Object_id (object-name )
Returns the object ID
Object_name ( object-id [, database-id ] )
Returns the object name
Suser_id( [user-name] )
Returns an integer user identification number
Suser_name( [user-id] )
Returns the user ID (server user name in Adaptive Server Enterprise)
Tsequal (timestamp, timestamp2 )
Compares timestamp values to prevent update on a row that has been modified since it was selected
User_id( [ user-name] )
Returns an integer user identification number. This does not return the Adaptive Server Anywhere user ID
User_name( [user-id] )
Returns the user ID (user name in Adaptive Server Enterprise)

Contents Index String functions Text and image functions