If you adhere to pure proprietary (ANSI) SQL, you will not have to modify any queries. An example of where you can use proprietary extensions is pagination. If you are doing any pagination in your web application, it is very likely that you are using something like this:
select id, name, created from thing limit(0,20)
This query will not work on Oracle, since limit is a proprietary extension for MySql, you will need to use pagination using the Oracle rownum (which can take only one argument), so you will have to rewrite your pagination requests like this:
select * from ( select a.*, ROWNUM rnum from ( your_query_goes_here, with order by ) a where ROWNUM <= :MAX_ROW_TO_FETCH ) where rnum >= :MIN_ROW_TO_FETCH;
Also think that you will use one of the Oracle extensions, so your database connection, manipulation and error handling code should also be overwritten ( example from the oci8 extension documents ) and will look more:
if ($c = oci_connect("hr", "hr_password", "localhost/XE")) { echo "Successfully connected to Oracle."; oci_close($c); } else { $err = oci_error(); echo "Oracle Connect Error " . $err['text']; } // Select Data... $s = oci_parse($c, "select * from tab1"); oci_execute($s, OCI_DEFAULT); while (oci_fetch($s)) { echo "COL1 = " . oci_result($s, "COL1") . ", COL2 = " . oci_result($s, "COL2") . "<br>\n"; }
So you can see that this is not a trivial feat, especially if you have tons of code protected by MySql.
If portability of your application is a serious problem, you should seriously consider using a library that allows you to completely abstract the database provider. I use Zend_Db (which, incidentally, supports Oracle), but there are others.