• Olga B (9/13/2011)


    Ah yes, my "favorite" bit of SQL syntax

    select 0 [A]

    A fun bug to find when I accidentally delete a comma and then try to figure out what's wrong with the output of

    select col1

    col2,

    col1003

    from sometable

    What? I can't be the only one!:ermm:

    Thanks for the question!

    My favorite syntax is

    select col1 AS [newcolname/sometime user friendly col name]

    from sometable

    Other syntax is less readable and as you wrote it may lead to unwanted bug. But maybe very usefull for code generators.