MSSQL: Indexes page shows only PK and unique constraints

endo64's profile image endo64 posted 8 years ago in General Permalink
HeidiSQL shows only PK and other unique constraint on Indexes page, which is confuses the users.

It executes the following SQL:
SELECT C.CONSTRAINT_NAME, C.CONSTRAINT_TYPE, K.COLUMN_NAME FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS AS C INNER JOIN INFORMATION_SCHEMA.KEY_COLUMN_USAGE AS K ON C.CONSTRAINT_NAME = K.CONSTRAINT_NAME AND K.TABLE_NAME='mytable' AND K.TABLE_SCHEMA='dbo' WHERE C.CONSTRAINT_TYPE IN ('PRIMARY KEY', 'UNIQUE') ORDER BY K.ORDINAL_POSITION;

But it doesn't show all the indexes on the table, as "sp_helpindex mytable" does.
It would be nice to be able to see all the indexes.
ansgar's profile image ansgar posted 8 years ago Permalink
See this thread

Please login to leave a reply, or register at first.