SIR, I NEED YOUR HELP IN THE FOLLOWING:-
Is Clustered Index instead for Primary Key?
will work same as Pk?
Is Non-Clustered Index instead for Foreign Key?
PLEASE TAKE A LOOK TO THE FOLLOWING SQL QUERY:-
CREATE CLUSTERED INDEX LIB_ID ON tbl_Library(LibraryId);
SET STATISTICS IO ON
SELECT * from tbl_Library where LibraryId=2
RETURN
WHAT THE ADVANTAGE OF USING THIS INSTEAD OF USING:
SET STATISTICS IO ON
SELECT * from tbl_Library where LibraryId=2
RETURN
Please tell me what are the advantages of using these Index in SQL Query?
Loading

Jignesh TrivediPosted Oct 9, 2013, 6:12 AM
yes we can create clustered index on a column other than primary key if a non clustered primary key constraint was specified.
as you know cluster index is work on physically sorted data.
same as for Foreign Key....
Also key constrain and idex both have their own advantages...
Pk and FK is constrain...