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 is a document index?

1028


What do you mean by SQL injection attack?

1066


You have developed an application which uses many stored procedures and triggers to update various tables users ocassionally get locking problems which tool is best suited to help you diagnose the problem?

1005


Explain something about security and SQL Azure?

134


What is the difference between dbcc indexdefrag and dbcc reindex?

987


What is a fan-out query in SQL Azure?

121


What is after dml trigger?

1016


What is Federation and Federation Member?

92


How to view the error log for any specific instance? : sql server database administration

1041


What is transaction server consistency?

1046


What were the latest updates to SQL Azure service?

111


How can you insert null values in a column while inserting the data?

1282


how to overcome kernel isssues

1625


What is a group function explain with an example?

990


can you implement data mining in SSRS?

148