Oracle system functions

Source: Internet
Author: User

1.single-row Functions

NVL
NVL2
Nullif
Coalesce
Case
DECODE

2.Character functions

LOWER (column|expression)--lowercase
UPPER (column|expression)--uppercase
Initcap (column|expression)--Capitalize first letter
CONCAT (Column1|expression1,column2|expression2)--string connection, equivalent to | |
SUBSTR (Column|expression,m[,n])--take substring, M: first n: How many digits to take
Length (column|expression)--Returns the length of the string
INSTR (column|expression, ' string ', [, M], [n])--Returns the position of the specified string in the query string, m: first N: Number of
Lpad (column|expression, N, ' string ')--left-padded, n-length, not enough to fill string
Rpad (column|expression, N, ' string ')--right-padded, n-length, not enough to fill string
TRIM (Leading|trailing|both trim_character from Trim_source)--Go
Replace (text,search_string,replacement_string)-Alternative

3.Number Functions

ROUND (Column|expression, N): (rounded) Rounds value to a specified decimal
TRUNC (Column|expression, N): (direct truncation) truncates value to a specified decimal
MOD (m,n): (redundancy) Returns remainder of division

4.Date functions

Months_between (' 01-sep-95 ', ' 11-jan-94 ')--calculates how many months of two days
Add_months (' 31-jan-96 ', 1)--How many months after a certain date
Next_day (' 01-sep-95 ', ' FRIDAY ')--the date of the next Friday
Last_day (' 01-feb-95 ')--the last day of one months
ROUND (sysdate, ' month ')--truncated from month (rounded)
TRUNC (sysdate, ' month ')--truncated from month (direct truncation)

Oracle system functions

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.