Always uppercase actions Always backtick tables Always use != for "not equals to" Always give an alias to a table SELECT a.name FROM `aTable` a WHERE a.id != 5