News for hackers. Stuff that matters.
Re:Writing more legible SQL by mythz on Thursday November 03, 2016 @03:09AM (#12862116)
I also use UPPER case for SQL Keywords to visually distinguish them from user-defined names (i.e. similar purpose to syntax coloring), but I don't collapse SELECT over multiple lines and line up each statement so the conditions line-up, e.g:

    SELECT foo, bar
      FROM baz
     WHERE foo > 3
       AND bar = '[email protected]'
Re:Writing more legible SQL by bhrgunatha on Thursday November 03, 2016 @05:35AM (#12862559)
That covers the simplest case.

What would you do when you're selecting 20 columns from 5 different tables joined together?

Re:Writing more legible SQL by alistairbayley on Thursday November 03, 2016 @03:53AM (#12862247)
Re uppercase: can't afford a syntax-highlighting editor?
Re:Writing more legible SQL by Sean1708 on Thursday November 03, 2016 @09:42AM (#12863839)
It's true that there are some editors which highlight SQL inside strings, but most don't.