Reserved Words - 1

  • Ron McCullough

    SSC Guru

    Points: 63877

    Comments posted to this topic are about the item Reserved Words - 1

    If everything seems to be going well, you have obviously overlooked something.

    Ron

    Please help us, help you -before posting a question please read[/url]
    Before posting a performance problem please read[/url]

  • isaac.a

    SSC Enthusiast

    Points: 114

    Hi,

    I executed this in SQL server 2008 R2.

    I found that the select statement returned 5.

    But the answer says that create table will fail.

    Can you please check this

    Thanks.

    Isaac

  • kapil_kk

    SSC-Insane

    Points: 21316

    isaac.a (9/17/2013)


    Hi,

    I executed this in SQL server 2008 R2.

    I found that the select statement returned 5.

    But the answer says that create table will fail.

    Can you please check this

    Thanks.

    Isaac

    Did you selected another option also stating: Create table statement will executed successfully.

    You need to select two option for this options thats why checkboxes are there ๐Ÿ˜‰

    _______________________________________________________________
    To get quick answer follow this link:
    http://www.sqlservercentral.com/articles/Best+Practices/61537/

  • This was removed by the editor as SPAM

  • Koen Verbeeck

    SSC Guru

    Points: 258965

    Nice question Ron, thanks.

    Need an answer? No, you need a question
    My blog at https://sqlkover.com.
    MCSE Business Intelligence - Microsoft Data Platform MVP

  • Hany Helmy

    SSChampion

    Points: 13488

    Good Question; yet I had to execute & test the code myself to double check my answer cause I was not sure about using this brackets ([]) when QUOTED_IDENTIFIER is set to OFF.

    Good to know something new (to me @ least :-))

  • Mr. Kapsicum

    SSCertifiable

    Points: 6128

    very nice question. ๐Ÿ™‚

  • Carlo Romagnano

    SSC-Insane

    Points: 21987

    I remember this one http://www.sqlservercentral.com/questions/T-SQL/71215/

  • Toreador

    SSChampion

    Points: 11257

    Nice question, but I can't understand why the stuff about quoted identifiers is in the explanation. Surely the result is identical even if QUOTED_IDENTIFIER is On?

  • SQLDoubleG

    Hall of Fame

    Points: 3090

    Thanks for the question but the explanation is a bit confusing. As per BOL

    http://technet.microsoft.com/en-us/library/ms174393.aspx

    When SET QUOTED_IDENTIFIER is OFF, literal strings in expressions can be delimited by single or double quotation marks. If a literal string is delimited by double quotation marks, the string can contain embedded single quotation marks, such as apostrophes.

    and

    Using brackets, [ and ], to delimit identifiers is not affected by the QUOTED_IDENTIFIER setting.

    Cheers

  • Raghavendra Mudugal

    SSChampion

    Points: 10658

    Stewart "Arturius" Campbell (9/18/2013)


    Good question, Ron, thanks

    Didn't even have to bother executing the T-SQL, which is, after all, what this is all about...

    +1

    ww; Raghu
    --
    The first and the hardest SQL statement I have wrote- "select * from customers" - and I was happy and felt smart.

  • ksatpute123

    Hall of Fame

    Points: 3325

    Easy and educational. Thanks.

  • Luis Cazares

    SSC Guru

    Points: 183633

    I need some coffee :doze: I calculated the type instead of the hours and got it wrong.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • TomThomson

    SSC Guru

    Points: 104773

    Toreador (9/18/2013)


    Nice question, but I can't understand why the stuff about quoted identifiers is in the explanation. Surely the result is identical even if QUOTED_IDENTIFIER is On?

    I think that wa the point of the question: the seting of quoted_identifier only affects the treatment quote marks as delimiters. not the treatment of square brackets.

    Tom

  • Toreador

    SSChampion

    Points: 11257

    L' Eomot Inversรฉ (9/18/2013)


    I think that wa the point of the question: the seting of quoted_identifier only affects the treatment quote marks as delimiters. not the treatment of square brackets.

    You're probably right ๐Ÿ™‚

Viewing 15 posts - 1 through 15 (of 28 total)

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