Different databases have differences in SQL support & implementation. Sometimes there is a difference in SQL syntax, sometimes support for some SQL commands is missing, sometimes the database has a feature that other databases do not have.
What are considered to be good practices in writing SQL queries that are good for different databases (MySQL, PostgreSQL, Oracle, MSSQL, SQLite) taking in account that the developer uses a framework (like CakePHP, Codeigniter, Zend etc.) that provides a database abstraction layer? What SQL syntax should the developer try to avoid?