COL_NAME function [System]

Function

Returns the column name.

Syntax

COL_NAME ( table-id, column-id [, database-id ] )

Parameters

table-id The object ID of the table

column-id The column ID of the column

database-id The database ID

Examples

The following statement returns the column name lname. The object ID of the customer table is 100209, as returned by the OBJECT_ID function. The column ID is stored in the column_id column of the syscolumn system table. The database ID of the asiqdemo database is 0, as returned by the DB_ID function.

SELECT COL_NAME( 100209, 3, 0 ) FROM iq_dummy

The following statement returns the column name city.

SELECT COL_NAME ( 100209, 5 )FROM iq_dummy

Standards and compatibility

See also

“DB_ID function [System]”

“OBJECT_ID function [System]”

“SYSCOLUMN system table”