Introduction to Oracle system variable functions _oracle

Source: Internet
Author: User

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.

Related Article

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.