Forum Replies Created

Viewing 15 posts - 2,131 through 2,145 (of 3,348 total)

  • RE: Transactions 1

    Thomas Abraham (5/16/2012)


    Thanks for the question.

    Got it wrong, and I even ran a test. Code below:

    CREATE TABLE #Temp(Col1 INT NOT NULL

    CONSTRAINT PK_QOTD_1 PRIMARY KEY (Col1))

    ...

  • RE: Transactions 1

    Christian Buettner-167247 (5/16/2012)


    Hm, I am a little confused because of the missing comma before the CONSTRAINT declaration. That does not seem to be required based on a first test. But...

  • RE: Transactions 1

    Nice question. I knew about implicit transaction, but I had to do some digging because I couldn't remember if primary key violation errors are batch-aborting or not.

    (One possible -slight!- improvement...

  • RE: SYSLanguages on SQL 2012

    L' Eomot Inversé (5/14/2012)


    It seems unlikely that 40% of people are unaware that this has changed since SQL Server 2000, and there's no other sensible reason for anyone to get...

  • RE: NULLS

    Prasune Verma (5/11/2012)


    I got the answer right but only after removing 'Null' from the declaration of the Local Variable.

    So I guess you are running SQL Server 2005 or older?

    The ability...

  • RE: NULLS

    Good question, but a BIG mistake in the explanation!!

    "COALESCE returns a datatype from the first non-null value in the statement depending on data type precedence"

    The datatype of the first non-null...

  • RE: SELECT * usage

    WayneS (5/10/2012)


    Hugo:

    I tried (and sent this QotD to several folks to get their opinions) to make this a good QotD without this controversy. How would you have worded this to...

  • RE: SELECT * usage

    L' Eomot Inversé (5/10/2012)


    Good question, but wrong answer given as right.

    The wrong answer made no points difference to me, because I managed to get it utterly wrong even...

  • RE: SELECT * usage

    jalvarocrespo (5/10/2012)


    Tricky question indeed.

    Well, but I can't find any difference between the result obtained and my response: When the table contains sparse columns and a sparse column set, then any...

  • RE: SELECT * usage

    Good question, Wayne. And thanks Koen for the additional reference.

    Also, the result set in the explanation is not really correct. The ColumnSet row will display XML data. I assume that...

  • RE: String comparison

    L' Eomot Inversé (5/9/2012)


    Hugo Kornelis (5/9/2012)


    Nice question!

    However, the explanation and reference are slightly incomplete, as they don't explain the behaviour of @A LIKE @b-2 versus @ LIKE @A.

    The explanation for...

  • RE: View 7

    jalvarocrespo (5/9/2012)


    From BOL,

    UNIQUE

    Creates a unique index on a table or view. A unique index is one in which no two rows are permitted to have the same index key...

  • RE: View 7

    jalvarocrespo (5/9/2012)


    But, IMO, the reason would be the fact that ID2 must be set as NOT NULL to enable the creation of the index.

    Nope. You can create an index on...

  • RE: String comparison

    Nice question!

    However, the explanation and reference are slightly incomplete, as they don't explain the behaviour of @A LIKE @b-2 versus @ LIKE @A.

    The explanation for that can simply be found...

  • RE: View 7

    dogramone (5/8/2012)


    Wow, did a google search and there was no mention in any of the four posts I checked about the count_big so I got it wrong.

    You would have found...

Viewing 15 posts - 2,131 through 2,145 (of 3,348 total)