Reserved Words - 1

  • 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]

  • 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

  • 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

  • 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

  • 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 :-))

  • very nice question. ๐Ÿ™‚

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

  • 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?

  • 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

  • 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.

  • Easy and educational. Thanks.

  • 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
  • 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

  • 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