Forum Replies Created

Viewing 15 posts - 331 through 345 (of 658 total)

  • RE: T-SQL

    pchirags (1/4/2013)


    the options says NULL Values, not exactly one NULL.

    create table temp

    (a int, b int, constraint ukTemp unique (a,b))

    go

    insert into temp values (null,null),(null,1),(1,null)

    go

    Three rows contain Null values. One of them...

  • RE: T-SQL

    mtassin (1/4/2013)


    Since Uniqueness constraints basically enforce what they do with Unique Indexes, I was thinking that nobody uses Unique constraints anymore and just uses unique indexes since they can be...

  • RE: T-SQL

    I don't really like this question.

    "They are not the same, but they both enforce uniqueness of the column on which they are defined"

    assumes that they can both only be...

  • RE: Finding New Years Eve

    Hugo Kornelis (1/3/2013)


    For a method to find "last New Year's Eve" that works correctly in 2013 only, my suggested code would be

    SELECT CAST('20121231' AS datetime);

    <Like!>

  • RE: New Year's Math

    I got it right because although I couldn't be bothered working through the code, it was clearly adding lots of things to @NewYearsEve so the answer was never going to...

  • RE: Round And Numaric

    Raghavendra Mudugal (1/2/2013)


    Hope this helps

    It certainly does - and reminds my why I reluctantly stick to float for arithmetic!

    Here's the correct reference

    http://msdn.microsoft.com/en-us/library/ms190476.aspx

  • RE: Round And Numaric

    dineshbabus (1/2/2013)


    In first statement both values are rounded to 0 precision then how come on dividing it returns 6 digits after decimal point.

    Pls xplain .

    That's the only non-obvious part of...

  • RE: Finding New Years Eve

    Steve Jones - SSC Editor (1/1/2013)


    I changed to question to exclude Jan 31, this that doesn't work.

    Jan 30 won't work either. Jan 29 will only work in leap years.

  • RE: RAID

    Can't see the need for a Microsoft reference on a question that's about something universal. But I agree with Tom - I'd never use a Wikipedia reference as sole support...

  • RE: Divide by zero

    That required rather more brain cells than I was expecting to need on Christmas Eve :hehe:

    Glad to see that option 5 really should be correct, I'd started to think I...

  • RE: UNIQUE constraint

    Hugo Kornelis (12/20/2012)


    The Microsoft implementation of the UNIQUE constraint is non-standard, and therefor dangerous - people with experience in other DMBS'es who switch to SQL Server can easily run into...

  • RE: UNIQUE constraint

    SQLRNNR (12/20/2012)


    ...

    This demonstrates that multiple null values is possible and that multiple null values is even possible within each of the columns so long as all of the columns together...

  • RE: SET Options - 1

    Thanks for the easy question to end the week!

    😉

  • RE: Renaming a procedure

    Hugo Kornelis (12/12/2012)


    The speculative answer: Documenting behaviour is one way to "close" a bug deemed not important enough to warrant fixing.

    Makes sense. I wish I could get away with that...

  • RE: Renaming a procedure

    Hugo Kornelis (12/12/2012)


    Using sp_rename to rename a programmability item does not change its definition in sys.sql_modules. That's why Books Online recommends to use DROP / CREATE instead.

    I've never quite...

Viewing 15 posts - 331 through 345 (of 658 total)