Use the jOOQ Parser to translate any SQL statement(s) to a different dialect.*
-- Put your SQL statement here
-- Put your schema definition here (optional) -- -- While this is not a strict requirement, you will -- get much better results as jOOQ knows about constraints, -- data types, column names, etc. Especially when -- translating to jOOQ/Java code, in case of which the -- resulting jOOQ code can table and column references -- from the code generator.
|Search path, comma separated|
|Parse unknown functions|
|Retain comments between queries|
|Enable ignore comment syntax|
|Ignore comment start token|
|Ignore comment stop token|
|Remove unnecessary arithmetic|
|AS keyword in SELECT|
|AS keyword in FROM|
|INNER keyword in JOIN|
|OUTER keyword in JOIN|
|More formatting Options||Coming soon!|
*How does it work?
The input dialect is a mixture of all of jOOQ's currently supported SQL dialects. The grammar can be found here.
The output is what jOOQ would generate if you ran the input query using a given dialect. It may not actually work on the target database, if the relevant feature isn't supported by the target database and jOOQ doesn't currently emulate it.
If you've found an error, or would like to suggest an improvement, please report it here, along with your input query: https://github.com/jOOQ/jOOQ/issues/new.
Cool, can I embed this in my application!?
Yes! And you don't even need to use the jOOQ API. The parser can be exposed through the JDBC API.
For more details, read this blog post: https://blog.jooq.org/top-5-hidden-jooq-features/
Do you have any feedback about this page? We'd love to hear it!