There are a variety of Oracle functions, and the system variable function is one of them, and here's a look at three of the most common system variable functions, which I hope will help you learn about Oracle.
Oracle System Variable functions:
(1) sysdate
The function returns the current date and time. Returns the current date and time of the Oracle server.
Select Sysdate from dual;
INSERT INTO purchase values
(' Small Widget ', ' SH ', sysdate, 10);
INSERT INTO purchase values
(' Meduem wodget ', ' SH ', sysdate-15, 15);
View all sales records for the last 30 days, using the following command:
SELECT * FROM Purchase
where purchase_date between (sysdate-30) and sysdate;
(2) USER
View the user name.
Select User from Dual;
(3) USERENV
View various information about the user's environment.
Select Userenv (' TERMINAL ') from dual;
The above Oracle system variable function is introduced.