-
-
Save zzzeek/5710206 to your computer and use it in GitHub Desktop.
| Does this SQL work on your database? Need to know for older database versions!! | |
| Postgresql 9.1.4: Y | |
| Oracle 10: Y | |
| SQL Server 2008: Y | |
| MySQL 5.5.15: Y | |
| SQLite 3.7.15: N | |
| MySQL 4.?? | |
| MySQL 5.?? | |
| Postgresql 8.?? | |
| Postgresql 7.?? | |
| SQL Server 2005? | |
| SQL Server 2000? | |
| Oracle 8? | |
| Oracle 9? | |
| create table a(id integer); | |
| create table b(id integer); | |
| create table c(id integer); | |
| select a.id, b.id, c.id from a join (b join c on b.id=c.id) on b.id=a.id; |
Works on MySQL 5.5.24.
MySQL 5.1.66: Y
MySQL 5.0.51a: Y
great so we should be mostly out of the woods for MySQL.
Oracle 9.2.0.8.0 Y
MySQL 5.1.30: Y
Oracle 8 doesn't support ANSI "join" keyword. Is there an alternative sql you'd like me to attempt for 8i?
Well on Oracle 8 we actually rewrite joins as "x = y" and outer joins with "x(+) = y" (or whatever it is). I'm not sure how great this old rewriting logic scales out in any case. I'll have to test to see waht it does when you give it a join (b join c), we might be OK.
we're fine on oracle 8 (I think). Had to tweak it a bit but it just flattens out the joins as usual.
I've been amazed at how well sqlalchemy does this for Oracle 8. We have customers using it extensively.
Late to the party, but postgresql 8.3.23: Y
5.1.68 - Y