Can we create clustered index on non primary key column

Answer Posted / pavan kumar

YES, We can create a clustered index on a non-primary
column. Check the folowing queries...

CREATE TABLE EMPLOYEES
(
empid int NOT NULL CONSTRAINT ix_pkEMPLOYEES PRIMARY KEY
NONCLUSTERED
, name varchar(25) NOT NULL
, age tinyint NOT NULL
)

CREATE CLUSTERED INDEX ixcEMPLOYEES ON EMPLOYEES (name)

Is This Answer Correct ?    57 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain about SQLOS?

592


Can you please explain the difference between primary keys and foreign keys?

660


What is the difference between nvl and nvl2?

556


Can we shrink data file in sql server?

539


What is use of except clause? How it differs from not in clause?

603






Write query to return all rows sql?

620


What is msdb database? : SQL Server Architecture

541


Explain hostprotectionattribute in sql server 2005?

601


How to set the current database in ms sql server?

534


What is create command?

525


Define cursor locking

551


Is there any performance difference between if exists (select null from table) and if exists (select 1 from table)?

529


Can we write a distributed query and get some data which is located on other server and oracle database?

769


How to execute a sql statement using odbc_exec()?

574


How do you make a trace?

588