Hacker News new | ask | show | jobs
by Revell 3518 days ago
I write my SQL as follows:

    SELECT `second_column`,
           `fourth_column`
      FROM `table_name`
     WHERE `first_column` = 'Value'
       AND `third_column` = 3
  ORDER BY `fifth_column` ASC
     LIMIT 1
2 comments

Well that is cute. I find it odd that the second line of the where clause is on the same level as the where but a neat format otherwise. Tabs or spaces though?
What happens when you need to do something non-trivial? Ie. nested selects, joins or even only some more complex expression in WHERE?