[Dbix-class] select from dual

A. Pagaltzis pagaltzis at gmx.de
Mon Jul 17 13:50:04 CEST 2006


* Jess Robinson <castaway at desert-island.demon.co.uk> [2006-07-17 00:30]:
> What did you need it for?

Basically, in Oracle, you can’t say things like

    SELECT NOW();

because a SELECT without a `FROM` clause is a syntax error. So
instead it has this weird special-case single-row, single-column
table called `dual` that always exists, so you have to say things
like that like so:

    SELECT SYSDATE FROM dual;

Isn’t Oracle cool?

Regards,
-- 
Aristotle Pagaltzis // <http://plasmasturm.org/>



More information about the Dbix-class mailing list