mysql and oracle outer join syntax

From: Date: Tue, 24 Jul 2001 18:01:58 +0000
Subject: mysql and oracle outer join syntax
Groups: php.db 
Request: Send a blank email to php-db+get-10719@lists.php.net to get a copy of this message
hello all. i have a question - but first some background... the standard LEFT JOIN syntax is something like this: SELECT t1.a, t1.b, t1.c, t2.d, t2.e FROM table1 t1 LEFT JOIN table2 t2 ON t1.x = t2.x WHERE t1.a = 'some condition or another'; i much prefer to do LEFT JOINs like this however: SELECT t1.a, t1.b, t1.c, t2.d, t2.e FROM table1 t1, table2 t2 WHERE t1.x = t2.x AND t1.a = 'some condition or another'; however, now i've got to convert this to an OUTER JOIN. i know that with oracle, you can add a plus somewhere like this (although i'm unclear what the precise syntax is): SELECT t1.a, t1.b, t1.c, t2.d, t2.e FROM table1 t1, table2 t2 WHERE t1.x = t2.x+ [note the plus here] AND t1.a = 'some condition or another'; and now the question.... does anyone know if there's a way with mysql to use the oracle-esqe + to do an OUTER JOIN so i don't have to go back and rewrite all of my sql statements? thanks a lot! alvin

« previous php.db (#10719) next »