Hi everybody,

I'm creating some queries similar to this one:
SELECT CASE WHEN EXISTS (SELECT * FROM table ) THEN 'yes' ELSE 'no' END;
This query runs on Postgres without the FROM clause for the outer SELECT, 
however, on Oracle I have to add "FROM dual" to make it work.

It would be nice to have a method, e.g. in SelectQuery, like addFromDummyTable 
which adds nothing for Postgres, "FROM DUAL" for Oracle and something similar 
for other dialects. MySQL also seems to support DUAL. Currently I'm manually 
adding something like "FROM (SELECT 1) as dummy" to each query.

I can try to come up with an implementation for that if you're interested in 
this.

Cheers,
Jörg

Reply via email to