Last updated September 26, 2013. Created on September 26, 2013.
Edited by Island Usurper. Log in to edit this page.

In both MySQL and PostgreSQL, when giving tables aliases in the FROM clause, it is optional to use the AS keyword.

SELECT n.nid, u.uid, FROM {node} AS n LEFT JOIN {user} AS u ON n.uid = u.uid;

However, the Oracle database does not allow AS to be use in FROM or any JOINs.

SELECT n.nid, u.uid, FROM {node} n LEFT JOIN {user} u ON n.uid = u.uid;

Unfortunately, this makes finding the right alias for a table rather difficult.

Looking for support? Visit the forums, or join #drupal-support in IRC.