Oracle system Variable function usage Guide _oracle

Source: Internet
Author: User

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

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, ten);
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.

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.