COL_NAME
catalog lookup
What changes
- Input
- catalog metadata (object, column, index, file, database properties)
- Output or change
- id, name or property value
- Return type
- sysname
Syntax at a glance
COL_NAME ( table_id , column_id )
Work example
Resolve a column id to its visible column name.
Use schema-qualified names and test missing and permission-hidden objects separately.
Check your work Pair the id with the correct object id and database context.
Open Microsoft Learn for full syntax, permissions, and details for your version.