Description of environment variable definition of NLS_DATE_FORMAT

Source: Internet
Author: User

AboutEnvironment Variable NLS_DATE_FORMATOne point of definition is what we will introduce in this article.OracleIn database operations, the most frequently used Oracle client tool is PL/SQL Developer. When you use this client to write PL/SQL statements, for date fields, generally, the to_date function is used for conversion.

For example:

Select * from tab1 where operdate = to_date ('2014/1/26', 'yyyy/MM/dd ').

It is troublesome to use the to_date function for each query. Is there a simple way? The answer is yes.

Solution:

After "NLS_DATE_FORMAT = YYYY/MM/DD HH24: MI: SS" is defined in the windows environment variable, the preceding query statement can be directly written:

Select * from tab1 where operdate = '2014/1/26'

In this way, it is much simpler.

The preceding steps can be a simplified procedure for SQL statements after the environment variable NLS_DATE_FORMAT is defined. We will introduce this article. If you want to learn more about Oracle databases, can take a look at the article here: http://database.51cto.com/oracle/, I hope this introduction can be a harvest for you!

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.