T-SQL

  • Well, maybe I'm nitpicking, but the question says "List all the differences....." and one of the answers (correctly) says they "both enforce uniqueness...." - well, if they BOTH enforce uniqueness, that is not a difference, is it???

    Maybe just my interpreation of the question here....

  • The answer is wrong unless we are playing grade school try to trick the student games. The 1 letter difference between what may be considered wrong and what is correct is a little stupid. Either way, the answer could still be considered wrong as pointed out by many others.

  • Since everyone is playing word games why don't we look at this one:

    by default a Primary key creates a Clustered Index

    This should really say:

    by default a Primary key creates a Clustered Index if a clustered index does not already exist on the table

    If you already have a clustered index defined on the table that is not a primary key and then you create a primary key without specifying it is clustered or nonclustered. You get an error if you try to create a primary key specifying a clustered index if one already exists.

  • Lynn Pettis (1/7/2013)


    Since everyone is playing word games why don't we look at this one:

    by default a Primary key creates a Clustered Index

    This should really say:

    by default a Primary key creates a Clustered Index if a clustered index does not already exist on the table

    If you already have a clustered index defined on the table that is not a primary key and then you create a primary key without specifying it is clustered or nonclustered. You get an error if you try to create a primary key specifying a clustered index if one already exists.

    I've already pointed that out a couple of times, but I think people must see my name against an update and skip reading it :crying:

  • Toreador (1/7/2013)


    Lynn Pettis (1/7/2013)


    Since everyone is playing word games why don't we look at this one:

    by default a Primary key creates a Clustered Index

    This should really say:

    by default a Primary key creates a Clustered Index if a clustered index does not already exist on the table

    If you already have a clustered index defined on the table that is not a primary key and then you create a primary key without specifying it is clustered or nonclustered. You get an error if you try to create a primary key specifying a clustered index if one already exists.

    I've already pointed that out a couple of times, but I think people must see my name against an update and skip reading it :crying:

    It must be hidden in the noise of the NULL complaints. I don't remember seeing it.

  • L' Eomot Inversé (1/5/2013)


    Lynn Pettis (1/4/2013)


    However, each pair is unique and attempting to enter a duplicate will fail.

    Yes, of course attempting to insert a duplicate will fail, that's the whole point...

    when someone tries to justify one of the author's errors by making a nonsense claim that needs to be debunked, and the question's author has taken encouragement in his misunderstanding from that nonsense, it doesn't help at all to jump in with a completely irrelevant comment that may be misinterpreted as contradicting that debunking.

    +1

  • The third answer: "They are not the same..." does not describe how they are different, so this is not a valid answer.

    One difference not mentioned is that there can only be one Primary Key in each table, but there can be multiple unique keys.

  • I think it's rather a vague question: list the diffferences and give answers which say that they're the same to some extent...

  • +1

  • I got wrong. But the last answer was confusing.

  • there is 5 answers are available....????????

    Manik
    You cannot get to the top by sitting on your bottom.

Viewing 11 posts - 61 through 70 (of 70 total)

You must be logged in to reply to this topic. Login to reply