Translating MySQLqueries into HSQLDB and Oracle queries

ぃ、小莉子 提交于 2020-01-14 04:44:10

问题


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.


回答1:


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




回答2:


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.



来源:https://stackoverflow.com/questions/8802209/translating-mysqlqueries-into-hsqldb-and-oracle-queries

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!