Introduction to Oracle System Variable Functions

Source: Internet
Author: User

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

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.