Oracle's dual is what ah ?? (A: pseudo-table)

1. dual indeed a table is a table only one field, one line recording.
2. habit we call 'pseudo-table' because he does not store data theme.
3. His presence is to convenience of operation as select are to have a particular object..
such as: select * from MyTable;
select * from MyView;
. and so on
, but if we do not need to obtain specific data in the table from the table, but simply to get some of the information we want, when and to complete by select, necessary to use an object, the object is dual;
as we have to calculate the value of 999 * 999, you can use:
the SELECT 999 999 * from dual;
to achieve;
to splicing a telephone information:
the SELECT concat ( '010 -', '88888888') || 'turn 23' senior cadres of the competing phone from dual;

it becomes the output format we want.

4. of course, we do not have dual , it can do so for example:.
the Create the Table mydual (dummy VARCHAR2 (1));
can also achieve the same effect Dual:
the SELECT 999 * 999 from mydual;
however, dual we are used to it, it is meaningless yourself and then engage in a sets up.

Guess you like

Origin www.cnblogs.com/curedfisher/p/11534009.html