News for hackers. Stuff that matters.
Re:How I write SQL by iaskwhy on Wednesday May 01, 2013 @01:17PM (#5639274)
For the WHERE clauses one can use:

  WHERE 1=1
  AND ...
  --AND ...
  AND ...
I do not like having commas at the beginning of the lines though.
Re:How I write SQL by ExpiredLink on Wednesday May 01, 2013 @01:31PM (#5639390)
> WHERE 1=1

ORM frameworks frequently use this when they create SQL.