This won't work in Postgres since it doesn't have any DUALs.
SELECT 'Ok' AS RESULT FROM DUAL
On the other hand, this won't work in Oracle since it requires a FROM clause
SELECT 'Ok' AS RESULT;
The idea is to execute some dummy SQL merely to check the connection.
How do I do it in a way that is supported by both RDBMSes?
Ideally it should work with versions dating back to:
- Postgres 13.14
- Oracle 11.2.0.3.0
but I'm interested in more modern solutions as well if there is nothing compatible.