Bineesh  Viswanath

Bineesh Viswanath

  • NA
  • 1k
  • 777.7k

Clustered and Non-Clustered Index in SQL Server

Oct 9 2013 12:22 AM
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?

Answers (1)