I have got a bunch of working queries which can be executed correctly in MySQL. I would also need those statements in both hsqldb and oracle.
There are number of tutorials which teach you how to create queries for hsqldb and oracle from scratch but they haven't explained how to translate the queries directly.
What would you suggest me to do?
If the queries were translated, would there be a way for me to test them? I cannot test the queries directly because I only have MySQL available.
If you are certain that all your target databases are compliant with ANSI SQL you can use use the Mimer online syntax checker. It's free (as far as I can tell). Find out more.
This won't help you if you want to convert e.g. MySQL
limit
to the equivalent in Oracle (where rownum <=
) or HSQLDB (limit
ortop
).There is no way you can just manually translate
MySQL
queries to get it working withOracle
andHSQLDB
queries.You will need to download Oracle and HSQLDB on your system. Since its free you might not bother to pay for them.
Later create your Tables and test the queries on the same.
Keep in mind that each of the the databases will support different keywords,syntax and data types.
So testing each translated query on its corresponding Database will yield you the best results.