COL_NAME

Returns the name of a column from a specified corresponding table identification number and column identification number.

Syntax

COL_NAME ( table_id , column_id )

Arguments

table_id

Is the identification number of the table that contains the column. table_id is of type int.

column_id

Is the identification number of the column. column_id parameter is of type int.

Return types

sysname

Examples

SELECT COL_NAME(OBJECT_ID('HumanResources.Employee'), 1) AS 'Column Name';

See Also