Previous Topic

Next Topic

Inhoudsopgave

Book Index

Index_Col

Index_Col( table_name, index_id, N [, owner_id] )

Returns the column name of the Nth column in the specified index.

Example

select Index_Col( 'T_ProdBillOfMat', IndId, 1 )

from sysindexes

where Id = Object_Id('T_ProdBillOfMat')

and name = 'PK_T_ProdBillOfMat'

Difference

MS SQL Server only supports three arguments. The concept of ‘owners’ in MS SQL Server is implemented as ‘schemata’. The functionality is exactly the same as in ASE, since in MS SQL Server the syntax is as follows.

Index_Col( [[database.[schema].] | [schema.] table, index_id, N )