Dual is a virtual table used to form the select syntax rule. oracle ensures that there will always be only one record in dual. We can use it to do a lot of things, as shown below: 1. To view the current user, you can execute the following statement select user from dual in SQL Plus; 2. It is used to call the system function select to_char (sysdate, 'yyyy-mm-dd hh24: mi: ss') from dual; -- Obtain the current system time select SYS_CONTEXT ('userenv', 'terminal') from dual; -- Obtain the host name from dual; -- Obtain the current locale select dbms_random.random from dual; -- obtain a random number 3. Obtain the next value or current value of the sequence. Use the following statement to select your_sequence.nextval from dual; -- Obtain the next value of the sequence your_sequence select your_sequence.currval from dual; -- Obtain the current value of the sequence your_sequence. 4. You can use the calculator select 7*9 from dual;
From the column in Chinajash