COL_NAME function [System]

Function

Returns the column name.

Syntax

COL_NAMEtable-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 Customers 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 iqdemo 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]”