MySQL Style Guide

I’m a big believer in readability, and I love to write code that is easy to understand. Check out my newly-posted MySQL Style Guide which covers:

  • Simple queries
  • Complex queries
  • Subqueries
  • UNIONS
  • Advanced queries

Useful tips:

  • Use table aliases sparingly and only when absolutely necessary (a few extra keystrokes now will save you hours of gazing at cryptic queries later)
  • CAPITALIZE keywords religiously
  • Whitespace and tabs are your friends!
Written on July 29, 2009