Oracle Learning (ix) built-in functions for common systems

Source: Internet
Author: User
Tags expression square root

To_char ();--Convert to String

To_number ();--Convert to numeric type

To_date ();--Convert to date type

1. Common Mathematical operation function

ABS (Value): Returns the absolute value of

Ceil (value): Returns the smallest integer greater than or equal to value

cos (value): Returns the cosine of value

Floor (value): Returns the largest integer equal to or less than value

MoD (value1,value2): Returns value1 divided by value2 remainder

Power (Value,e): Returns the E-exponentiation of value

Round (value,precision): Keep precision decimal places rounding value

Sign (value): Returns 1 if value is positive, minus 1, or returns 0.

sqrt (value): Returns the square root of value.

Trunc (value,precision): is an intercept function, if the precision is positive, then to the right of the decimal point to intercept precision bit, negative to the left to intercept the precision bit.

2. Common String Functions

Length (value): Returns the lengths of value, which can be a string, a number, or an expression

Lower (value): Change the given string value to lowercase

Upper (value): Turns the given string value to uppercase

Lpad (string,length[,padding]): Fills the padding on the left side of a string until the length of the string is long, and if no padding is specified, the default padding space

Rpad (string,length[,padding]): Fills the padding on the right side of the string, knows the length of the string reaches length, and if padding is not specified, the default padding space

LTrim (String[,trimvalue]): Remove the trimvalue from the left and remove the space if Trimvalue is not specified

RTrim (String[,trimvalue]): Remove the trimvalue from the right, or remove the space if Trimvalue is not specified

string1 | | string2: Connecting two strings to a string

Initcap (String): Capitalize the first letter of a string

Replace (string,src,dest): replace Src in String with dest

SUBSTR (String,start[,count]): Intercepts count characters from start position in string, and if count is not specified, intercept to end

3. Statistical function

AVG ([distinct] columnName): Returns the average of all values in the ColumnName, and returns the average of all the different non-null values if you use distinct

Count ([distinct] value): Counts the number of records, and if you use DISTINCT, you only count the different non-null values. Value can be a field name or an expression

Max (ColumnName): Returns the maximum value in ColumnName

Min (columnName): Returns the minimum value in ColumnName

SUM (columnName): Returns the sum of the values in ColumnName

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.