Problem:
Sometimes we need to know key of a table is cluster or noncluster.
Syntax:
-- Check IndexesSELECT OBJECT_NAME(OBJECT_ID) TableObject,[name] IndexName,[Type_Desc]FROM sys.indexesWHERE OBJECT_NAME(OBJECT_ID) =
'YourTableName'
Implemenatation:
Suppose you table name is StudentInfo
-- Check IndexesSELECT OBJECT_NAME(OBJECT_ID) TableObject,[name] IndexName,[Type_Desc]FROM sys.indexesWHERE OBJECT_NAME(OBJECT_ID) =
'StudentInfo'
No comments:
Post a Comment