Trailing

  • Comments posted to this topic are about the item Trailing

  • I'll admit, this one got me. :hehe:

    Thanks for the question.

    -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    This thing is addressing problems that dont exist. Its solution-ism at its worst. We are dumbing down machines that are inherently superior. - Gilfoyle

  • This is a quite uesful anomaly. It allows for easy cut'n'paste between table creation scripts, without worrying about deleting any trailing commas or having commas between constraints.


    Just because you're right doesn't mean everybody else is wrong.

  • Really wasn't expecting that answer. The skeptic in me does wonder how many people ran the SQL before giving an answer though 🙂

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • Okay, that's a little weird. Microsoft has updated the language to allow syntactically incorrect SQL based on popular habits. I see why they did it, but I don't agree with it.

  • Wow!!! Did not see that one coming.... :laugh:

  • Ed Wagner (10/11/2016)


    Okay, that's a little weird. Microsoft has updated the language to allow syntactically incorrect SQL based on popular habits. I see why they did it, but I don't agree with it.

    Oh, it's been like that for a long time. The same applies when initializing arrays in C#, by the way. Quite handy, if you ask me, and completely benign.


    Just because you're right doesn't mean everybody else is wrong.

  • Thom A (10/11/2016)


    Really wasn't expecting that answer. The skeptic in me does wonder how many people ran the SQL before giving an answer though 🙂

    I'm one of the people who ran the SQL before submitting my answer. I view it as testing, not cheating. 😉

    In this case, I was surprised by the results. I really expected it to return an error.

  • Interestingly, if you examine Information Schema Columns, the table only has 3 columns.

    There are no facts, only interpretations.
    Friedrich Nietzsche

  • barry.mcconnell (10/11/2016)


    Interestingly, if you examine Information Schema Columns, the table only has 3 columns.

    I'd be a lot more surprised if there were more columns than that. Without a name or data type there isn't much to go on.

    It's just a syntactical convenience where each item can be followed by a comma.


    Just because you're right doesn't mean everybody else is wrong.

  • It just feels wrong.

  • Iwas Bornready (10/11/2016)


    It just feels wrong.

    I would say 'counterintuitive'.

    Thanks to Steve for a provocative one.

  • Thanks for the question. I got it right only because I've seen it work. Not sure why it is allowed, though.

    - webrunner

    -------------------
    A SQL query walks into a bar and sees two tables. He walks up to them and asks, "Can I join you?"
    Ref.: http://tkyte.blogspot.com/2009/02/sql-joke.html

  • Thom A (10/11/2016)


    Really wasn't expecting that answer. The skeptic in me does wonder how many people ran the SQL before giving an answer though 🙂

    I selected my answer (execute with syntax warning).

    Ran the SQL, kept my answer wrong, assuming it was a trick question because I SQL2012 and this would be a new feature in SQL2016.

    Oh well, better luck next time.

  • I knew this one. 🙂

    Thanks a lot for the question.

    ~ demonfox
    ___________________________________________________________________
    Wondering what I would do next , when I am done with this one :ermm:

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

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