[Dbix-class] select from dual
Joel Bernstein
joel at fysh.org
Mon Jul 17 12:51:31 CEST 2006
On Sun, Jul 16, 2006 at 11:20:32PM +0100, Jess Robinson wrote:
> What did you need it for?
In Oracle, SELECT...FROM dual; is the construct by which certain system
constant parameters are checked. Dual is part of (or at least, created
at the same time as) the data dictionary, it has a single record with a
single column called dummy. It's typically used like (for example):
SELECT sysdate FROM dual;
Dual is effectively there to give the Oracle Optimizer a clue about how
to deal efficiently with queries involving those expressions in which it
is used. I'd hazard a guess that the OP only needs it for date
manipulation queries involving the DB system date, and that these may be
better made using one of the Oracle-specific control modules than via
DBIC. But obviously TMTOWTDI.
/joel
More information about the Dbix-class
mailing list