1. To view the current user, run the following statement selectuserfromdual in SQLPlus; 2. Call the system function selectto_char (sysdate,
1. To view the current user, run the following statement select user from dual in SQL Plus; 2. Call the system function select to_char (sysdate,
1. view the current user. You can execute the following statement in SQL Plus.
Select user from dual;
2. Used to call system functions
Select to_char (sysdate, 'yyyy-mm-dd hh24: mi: ss') from dual; -- get the current system time
Select SYS_CONTEXT ('userenv', 'terminal') from dual; -- get the host name
Select SYS_CONTEXT ('userenv', 'language') from dual; -- get the current locale
Select dbms_random.random from dual; -- obtain a random number
3. Obtain the next or current value of the sequence. Use the following statement.
Select your_sequence.nextval from dual; -- Obtain the next value of the sequence your_sequence
Select your_sequence.currval from dual; -- get the current value of the sequence your_sequence
4. It can be used as a calculator.
Select 7*9 from dual;