egg will break if it contains more than one row, read this...

rootbear (喝点啤酒晕晕头)
DUAL is a table automatically created by Oracle along with the data dictionary. DUAL is in the schema of the user SYS, but is accessible by the name DUAL to all users. It has one column, DUMMY, defined to be VARCHAR2(1), and contains one row with a value 'X'. Selecting from the DUAL table is useful for computing a constant expression with the SELECT command. Because DUAL has only one row, the constant is only returned once. Alternatively, you can select a constant, pseudocolumn, or expression from any table.

Note that DUAL can have more than one record. The kernel knows that DUAL is a single row single column table, but the PLSQL engine does not. This is important because things will break if it contains more than one. If you are running Oracle Applications, some patches dump multiple rows into the DUAL table. That is why the ADADMIN utility gives you options to check the dual table. We highly recommend doing this!

--from ora tips
2001-11-14 -05:00

回到话题: In Oracle, What is DUAL? what info can I get from DUAL?

回到论坛: HOME枫下论坛枫下论坛主坛工作学习IT技术讨论