Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Index by Create Index and Index by Keys

Author  Topic 

rajender
Starting Member

13 Posts

Posted - 2005-08-08 : 08:04:14
Hi Team

Is there any difference between the index created using Create Index statement and index created by a key internally i.e. created by Primary/Unique Key. Also is there any way to check whether a particular index created using a create index statement or by a key itself.

Thanks.
Rajender Kr.

Stalker
Yak Posting Veteran

80 Posts

Posted - 2005-08-08 : 08:13:56
>>Is there any difference between the index created using Create Index statement and index created by a key internally i.e. created by Primary/Unique Key

no

>>Also is there any way to check whether a particular index created using a create index statement or by a key itself.

well, no, unless you have created them through EM and haven't changed name of index, then name will look like 'PK_MyTable' for PK.
Go to Top of Page

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2005-08-08 : 19:42:49
Primary and unique keys are constraints, and are different from indexes because they are unique objects withing the data base, and must have a name that is different than any other object in the database.

You can list constraints on tables with:
select * from INFORMATION_SCHEMA.TABLE_CONSTRAINTS

The names of indexes are only required to be unique within a table.


CODO ERGO SUM
Go to Top of Page
   

- Advertisement -