Reserved Words - 1

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

    Yes... yes it is... I too can claim this one 🙂



    --Mark Tassin
    MCITP - SQL Server DBA
    Proud member of the Anti-RBAR alliance.
    For help with Performance click this link[/url]
    For tips on how to post your problems[/url]

  • Good question, Ron. It really made me look at the square brackets and field names and think it through before answering.

  • Well, and I failed to see something troublesome and answered correctly accidentily...

    For me this question was therefore... ...welllll...

    ________________________________________________________
    If you set out to do something, something else must be done first.

  • My biggest issue was that I assumed there wasn't more than one answer. I've gotten spoiled by the questions hinting that there is more than one answer.

    To be honest, the first time I attempted this on paper I got it correct (I totally suck at basic math in my head... 4 + 4 = 9 right?) but I verified by running it through ssms.

  • You got me, Ron... Thanks anyway!

  • I'm glad to see that a better reference has already been given. Saves me the trouble of looking for it.

    An interesting thing (maybe already mentioned in the discussion - I'm a bit short on time) is that deliimiting identifiers with [square brackets] is totally non-standard. As far as I know, only SQL Server and Access support this. The ANSI standard and all complying products use "double quotes" to delimit identifiers.

    I think the prime reason for the QUOTED_IDENTIFIER option is to supply backward compatibility. Old versions of SQL Server allowed both "double quotes" and 'single quotes' to delimit string constants, and this was sometimes used to enabl easier specification of string constants that include a single quote / apastrophe (so instead of 'O''Brian', you'd write "O'Brian").


    Hugo Kornelis, SQL Server/Data Platform MVP (2006-2016)
    Visit my SQL Server blog: https://sqlserverfast.com/blog/
    SQL Server Execution Plan Reference: https://sqlserverfast.com/epr/

  • mtassin (9/18/2013)


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

    Yes... yes it is... I too can claim this one 🙂

    Ditto

  • I picked the correct answer of 5 hours.

    But got...

    Sorry - you were wrong

    Correct answer:

    5 hours is returned by the SELECT statement, The create table statement succeeds

  • colt (9/25/2013)


    I picked the correct answer of 5 hours.

    But got...

    Sorry - you were wrong

    Correct answer:

    5 hours is returned by the SELECT statement, The create table statement succeeds

    The Questions are: This the plural, meaning there is more than a single (1) correct answer. If you only selected one (1) answer when more than one answer was required (requested) you are considered to be wrong.

    Does the create table statement fail or succeed?

    If the create table statement succeeds what value of TotalHours is returned by the Select statement?

    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]

  • D'oh. Thanks for the explanation.

  • Nice Question Ron.

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

  • very good question. 🙂

  • colt (9/25/2013)


    I picked the correct answer of 5 hours.

    But got...

    Sorry - you were wrong

    Correct answer:

    5 hours is returned by the SELECT statement, The create table statement succeeds

    same for me.

    How can I have a good 'select ....' answer if the 'create table fails' ?

    As I could not answer this I checked only one !

Viewing 13 posts - 16 through 27 (of 27 total)

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