×

Loading...

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

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
Report

Replies, comments and Discussions: