Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Can we create clustered index on non primary key column

Answer Posted / vamsi krishna

Create table Testing(testingID int,testingdesc varchar(20))
Note: I am not defining TestingID as primaryKey
create clustered index IX_TestingID on Testing(TestingID)
-- This will allow u to insert duplicate values to the
column that has clustered index created.

Instead run the below command to create unique Clustered
Index
create unique clustered index IX_TestingID on Testing
(TestingID)

-- The above statment will not allow u to add duplicate
records.
For your better conformation insert some records into the
tabel and execute a select statement having the clustered
index column in the where clause and check the execution
plan. You can see Index Seek.

Conclusion : Clustered index can be created on non
primaryKey column

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are cursors and when they are useful?

1149


What are exact numeric data types in ms sql server?

1139


what are the critical issues you have resloved in your company

2016


What is the fastest way to permanently delete a 1 million row table named customers?

1325


What are trace flags and mention a few common trace flags used with sql server?

1135


What is the current pricing model of SQL Azure?

104


What are triggers? How many triggers you can have on a table? How to invoke a trigger on demand?

1242


What is primary key, unique key, and foreign key?

1014


How do I find the sql server instance name?

1013


If you want to send some data from access database to sql server database. What are different component of ssis will you use?

1027


What are wait types?

1198


What is fill factor and pad index?

1060


Do you know what are the restrictions that views have to follow?

1126


How to disable stored procedure sql server?

1660


When would you use an insert into .. Select option versus an insert into .. Values option? Give an example of each?

1164