"ORACLE" SQL statement simple Application (iv) (11G)

Source: Internet
Author: User

Sort after adding nulls last in descending order, put null in the final

Select To_char (sysdate, ' Q ') from dual;

Dual pseudo-table public synonym because it has a record for easy reading

Select RowNum, ' A ' | | Rownum,mod (rownum,2) from dual connect by rownum<=10;

Select Rownum,to_date (' 2016-05-01 ', ' YYYY-MM-DD ') from dual connect by rownum<=10;

Select sysdate,sysdate+1/24,sysdate+1/1440 from dual;

Select To_char (sysdate, ' Fmyyyy-mm-dd h24:mi:ss ') from dual;

Select 100+NVL (null,0) from dual;

Select count (name), COUNT (1), COUNT (*) from T1;

Select COUNT (1) from T1;

group functions do not count null values

Union removes duplicate parts, sorts

Nuion all puts two sets together, does not remove duplicates, does not sort.

Intersect intersect

Default Defaults

only update set status=null this equals null condition

Delete does not lower the high water level, the deleted information is recorded in each article

Truncate lowers the high water level and completely removes

Number ( total number of digits, where several decimal points) The default value can be no parentheses and content

Timestamp(default 6 -bit can change) seconds with decimals

Blob(binary example: Photo storage)

Clob(character)

ORACLE SQL statement simple Application (iv) (11g)

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.