Conventions - jazd/Business GitHub Wiki

SQL

  • SQL words in all capitals.
  • Actual Table names, functions and views begin with a capital letter
  • Table Aliases begin with a lower case letter
  • Field names begin with a lower case letter
  • JOINs have joining table on left side of operator
    • JOIN Given ON Given.value = 'Steve'
  • Absolutely minimum WHERE clauses
  • Temporary variables use _ between words, everything else is CamelCase or camelCase.
    • goesBy_id := (SELECT GetGiven(inGoesBy));
  • Never use non-descriptive Table aliases