April 18, 2015 at 2:02 pm
Comments posted to this topic are about the item NONclustered 2 clustered
April 18, 2015 at 2:11 pm
Thanks for this question which seems very simple and evident ( at least it is my own opinion ).
I am surprised that only half of the voters have found the good choice.
And thanks also for the link to the sp_help procedure for which I have forgotten the columns returned for indexes.
April 18, 2015 at 6:50 pm
patricklambin (4/18/2015)
Thanks for this question which seems very simple and evident ( at least it is my own opinion ).I am surprised that only half of the voters have found the good choice.
And thanks also for the link to the sp_help procedure for which I have forgotten the columns returned for indexes.
Well, the numbers were pretty small when you answered - hardly a significant sample.
Nice simple quesion - but I'm not sure the right answer is evident; yes, it's clear that this is what the engine should do - but that's no guarantee at all that that's what it will do.
Tom
April 19, 2015 at 12:03 am
Very nice question, had to test it before answering
And the shortcut 4 exec sp_help dsa
is highlight the table and press Alt + F1
Thanks & Best Regards,
Hany Helmy
SQL Server Database Consultant
April 20, 2015 at 12:17 am
Nice Question.. Index remains same irrespective of altering the table by adding a constraint and then by adding an unique clustered index.. I believe the index should have been dropped and recreated as unique clustered primary key in the background. Please correct me if wrong or throw some light on its internal.
Note: 10 points in 5 days!!
______________________________________________________________Every Problem has a Solution; Every Solution has a Problem:
April 20, 2015 at 12:51 am
karthik babu (4/20/2015)
Nice Question.. Index remains same irrespective of altering the table by adding a constraint and then by adding an unique clustered index.. I believe the index should have been dropped and recreated as unique clustered primary key in the background. Please correct me if wrong or throw some light on its internal.Note: 10 points in 5 days!!
From BOL:
If the index enforces a PRIMARY KEY or UNIQUE constraint and the index definition is not altered in any way, the index is dropped and re-created preserving the existing constraint. However, if the index definition is altered the statement fails. To change the definition of a PRIMARY KEY or UNIQUE constraint, drop the constraint and add a constraint with the new definition.
April 20, 2015 at 3:51 am
This was removed by the editor as SPAM
April 20, 2015 at 5:28 am
What am I missing here? The BOL page for CREATE INDEX [url=https://msdn.microsoft.com/en-us/library/ms188783.aspx]https://msdn.microsoft.com/en-us/library/ms188783.aspx[/url] clearly mentions that:
The index type cannot be changed by using DROP_EXISTING.
Thanks & Regards,
Nakul Vachhrajani.
http://nakulvachhrajani.com
Follow me on
Twitter: @sqltwins
April 20, 2015 at 6:50 am
Thanks, Carlo, for a good question. It gets the brain moving on a Monday.
April 20, 2015 at 9:17 am
Thanks for the question. Had to think a bit about possible answer two.
April 20, 2015 at 9:23 am
Nice one, off the beaten path. Thanks, Carlo!
April 21, 2015 at 3:07 am
Nice question, thanks.
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
Viewing 12 posts - 1 through 11 (of 11 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy