August 2, 2011 at 11:03 am
Hi want to create primary key constraint with non clustered index.
any one tell me the below statement works are not .
CONSTRAINT PK_doc_metadata_doc_metadata_id PRIMARY KEY NONCLUSTERED ( column name)
August 2, 2011 at 11:20 am
Did you try it?
What you have there is part of the statement, it needs ALTER TABLE <tablename> adding before.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
August 2, 2011 at 11:31 am
actually i want to know is it possible to create primary key with non_cluster index.
August 2, 2011 at 11:38 am
Yes.
August 2, 2011 at 11:38 am
sravnmaganti (8/2/2011)
actually i want to know is it possible to create primary key with non_cluster index.
Yes.
Edit: man, you are fast
_____________________________________
Pablo (Paul) Berzukov
Author of Understanding Database Administration available at Amazon and other bookstores.
Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.August 2, 2011 at 11:45 am
PaulB-TheOneAndOnly (8/2/2011)
sravnmaganti (8/2/2011)
actually i want to know is it possible to create primary key with non_cluster index.Yes.
Edit: man, you are fast
I know, and it's about time you realized it too :-D.
THAT'S A JOKE!
August 2, 2011 at 11:49 am
Ninja's_RGR'us (8/2/2011)
PaulB-TheOneAndOnly (8/2/2011)
sravnmaganti (8/2/2011)
actually i want to know is it possible to create primary key with non_cluster index.Yes.
Edit: man, you are fast
I know, and it's about time you realized it too :-D.
THAT'S A JOKE!
😀 you made my day.
_____________________________________
Pablo (Paul) Berzukov
Author of Understanding Database Administration available at Amazon and other bookstores.
Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.August 2, 2011 at 11:52 am
HTH 😛
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply