Share: Oracle system variable function usage notes

Source: Internet
Author: User

in theOracle Database, the Oracle system variable function is a commonly used function that shares the usage of the Oracle system variable function.

There are a variety of Oracle functions, one of which is the system variable function, which describes the three most common system variable functions.

Oracle System Variable functions:

1) sysdate

The function returns the current date and time. The current date and time of the Oracle server is returned.
Select Sysdate from dual;
INSERT INTO purchase values
(' Small Widget ', ' SH ', sysdate, 10);
INSERT INTO purchase values
(' Meduem wodget ', ' SH ', sysdate-15, 15);
To view all sales records for the last 30 days, use the following command:
SELECT * FROM purchase # www.jbxue.com
where purchase_date between (sysdate-30) and sysdate;

2) USER

View the user name.
Select User from Dual;

3) USERENV
View a variety of information about your user environment.
Select Userenv (' TERMINAL ') from dual;
An introduction to the above Oracle system variable functions.

Share: Oracle system variable function usage notes

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.