Translating MySQLqueries into HSQLDB and Oracle qu

2019-05-30 05:59发布

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.

2条回答
太酷不给撩
2楼-- · 2019-05-30 06:17

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 or top).

查看更多
兄弟一词,经得起流年.
3楼-- · 2019-05-30 06:18

There is no way you can just manually translate MySQL queries to get it working with Oracle and HSQLDB 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.

查看更多
登录 后发表回答