SQL Flow Field Guide

INDEX_COL

Catalog support for SQL Server 2022 (16.x) and 2025 (17.x)

catalog lookup

What changes

Input
catalog metadata (object, column, index, file, database properties)
Output or change
id, name or property value
Return type
nvarchar (128 )

Syntax at a glance

INDEX_COL ( '[ database_name . [ schema_name ] .| schema_name ] table_or_view_name', index_id , key_id )

Work example

Read an indexed column name by key ordinal.

Use schema-qualified names and test missing and permission-hidden objects separately.

Check your work Use the correct table, index, and ordinal because included columns differ from key columns.

Open Microsoft Learn for full syntax, permissions, and details for your version.