In Oracle databases, Oracle System variable functions are frequently used. The following describes the Oracle System variable functions for your reference.
Oracle System variable functions:
1) SYSDATE
This function returns the current date and time. The current date and time of the Oracle server are returned.
Select sysdate from dual;
Insert into purchase values
('Smallwidget ', 'sh', sysdate, 10 );
Insert into purchase values
('Meduem wodget', 'sh', sysdate-15, 15 );
To view all sales records in the last 30 days, run 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 environment.
Select userenv ('terminal') FROM dual;
The preceding Oracle System variable functions are introduced.
Oracle trunc () function usage
Syntax for creating an Oracle package
Use of Oracle to_char Functions
Learn about the Oracle FBI Index
How to install Oracle as a Linux Service