May 10, 2011 at 9:14 pm
Nice question - required carefully reading .. but that is how the QOD should .. so again nice question.
May 11, 2011 at 12:09 am
Nice question with nice explanation.
-----------------
Gobikannan
May 11, 2011 at 12:11 am
Great question!
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
May 11, 2011 at 12:29 am
Good Question,
Srikant
May 11, 2011 at 1:48 am
Simple One i just need to read the question and answers carefully 🙂
May 11, 2011 at 2:23 am
Excellent question !
May 11, 2011 at 2:45 am
Nice question but this one almost had me because of the extra comma in the CREATE TABLE part of the query. When there wasn't a distractor with an error message to address that issue, I assumed that the creation of the table would have to work with the extra comma.
May 11, 2011 at 3:08 am
too simple.
May 11, 2011 at 4:16 am
Nice question.
One niggle: asking people to assume that a schema is valid when a table doesn't have a primary key may encourage a very bad habit if some of your audience don't know any better. Maybe "pretend" would have been a better choice of word than "assume".
Tom
May 11, 2011 at 4:24 am
A question that enables most people to get the correct answer after some careful thought is by no means "too simple". Especially as over 1/3 of respondants have got it wrong.
For me this was close to a "Goldilocks" question. For some it's too hard, for others too soft, but for many, it's just right.
May 11, 2011 at 5:25 am
Won't the create table statement fail due to the comma after the last column name?
May 11, 2011 at 7:13 am
sread (5/11/2011)
Won't the create table statement fail due to the comma after the last column name?
I just tried it on my machine and it ran fine. I do remember this being discussed someplace as being legit and someone mentioning that they have made a practice of doing to make it easier to add columns (one less thing to forget).
May 11, 2011 at 7:30 am
Excellent question and better explanation.
Malleswarareddy
I.T.Analyst
MCITP(70-451)
May 11, 2011 at 7:33 am
Really good question
M&M
May 11, 2011 at 8:06 am
Good easy question, but I do not agree with the answers explination.
A unique constraint is what a table needs to garuntee an column does not repeat values.
Making a column part of a Primary Key value does create a constraint for Unique values.
That is the effect not the cause.
If both columns in the table are selected as Primary Key, then you could still insert duplicates into the Unique_Id column.
Make sure your Identity columns have there own Unique Index and/or value constraint and you don't have to worry about dupes.
Viewing 15 posts - 1 through 15 (of 36 total)
You must be logged in to reply to this topic. Login to reply