Oracle Learning Summary

Source: Internet
Author: User

Set Linesize 120

Set PageSize 20

Column file_name format A8

V$nls_parameters a table in the data dictionary

Note about NULL:

1: Empty expression with null result

2: Determine whether a value equals null is used is does not equal with IS. Remember (null!=null)

3: If the collection contains null values, do not use not in but can use in

SQL Optimizations:

After Oracle9, * and column name efficiency, before, with * column name efficiency is higher, because Oracle to resolve *, so the efficiency is relatively slow

The use of like, a _ represents matching all, multiple _ represents matching multiple characters, the ' s% ' beginning with S, '%s ' ending with S, '%s% ' containing s

Transfer character: Escape from the top with an escape character

The name of the query containing _ this

1 SELECT *
2 from EMP
* * where ename like '%\_% ' escape ' \ '

When using and, should try to be false value on the left, when using or should try to be true truth on the left

Sort:

If the value to be sorted contains a null value, you should make it in the following select * from emp ORDER BY comm Desc nulls last;

Modify the format of the system date

SELECT * from V$bls_parameters;

Alter session set nls_date_format= ' Yyyy-mm-dd '; the original system date format is ' DD-MON-RR '

DISTINCT remove duplicate records (effect all columns behind it)

Select DISTINCT deptno from EMP;

Oracle Learning Summary

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.