Home Microsoft SQL Server DigiMailing iRN Contact
    Keyword



sys.spt_indexcolumns_view_managed

  No additional text.


Syntax

create view sys.spt_indexcolumns_view_managed
as
select distinct
	db_Name() as constraint_catalog,
	constraint_schema = SCHEMA_NAME(o.schema_id),
	constraint_name = x.name,
	table_catalog  = db_name(),
	table_schema = SCHEMA_NAME(o.schema_id),
	table_name = o.name,
	column_name = c.name,
	ordinal_position = xc.key_ordinal,
	KeyType  = c.system_type_id,
	index_name = x.name
from
	sys.objects o INNER JOIN sys.indexes x ON
		(
			o.object_id = x.object_id AND
			o.type in ('U')
		)  INNER JOIN
	sys.index_columns xc ON
		(
			xc.object_id = x.object_id AND
			xc.index_id = x.index_id
		) INNER JOIN
	sys.columns c ON
		(
			o.object_id = c.object_id AND
			xc.column_id = c.column_id
		)		


 
Last revision 2008RTM
See also

  sp_indexcolumns_managed (Procedure)
       



News

  Query a named instance
Sybase+ASE+silent+install
SQL 2008 R2
Deprecated procedures in SQL2008
Reporting Services item-level role definitions
Create all your missing indexes
Converting datetime field
Start MSSQL Server Profiler at time
Replicating MSSQL Server views
Exploring Microsoft Sharepoint
The OLE DB provider "SQLNCLI10" for linked server indicates.
Mobile solar charger
Oracle to SQL Server replication
Cannot insert the value NULL into column
Undocumented Microsoft SQL Server 2008
VMware
Zoekmachine optimalisatie
SQL Servers hidden objects
FckEditor
Flash in Ajax
De hype die AJAX heet
Barcode scannen
MySQL; Gratis, makkelijk en snel!
PHP
sIFR; de combinatie tussen HTML en Flash