Oracle Common system functions

Source: Internet
Author: User
Tags control characters

I. Character class function 1.ASCII (C) function and Chr (I) function

The ASCII (c) function is used to return the ASCII code of a character, where the parameter C represents a character.

The CHR (i) function is used to return the character corresponding to the ASCII code value, and I represents an ASCII value.

2.CONCAT (S1,S2) function

The function connects the string S2 to the back of the string S1, and if S1 is null, returns s2, or null if both S1 and S2 are empty.

3.INITCAP (s) function

The function capitalizes the first letter of each word of the string s, and the other letter is lowercase. Words are distinguished by spaces, control characters, and punctuation marks.

4.INSTR (s1,s2 ", I" ", J") functions

This function is used to return the position of the character S2 in the case of the J occurrence of the string S1. The search begins with the first character of the string S1.

When no characters are found, the function returns a value of 0;

I is negative, and the search is made from right to left, but the return position of the function is calculated from left to right.

5.LENGTH (s)

The function is used to return the length of the string s

6.LOWER (s) function and upper (s) function

Returns the lowercase and uppercase forms of the string s. These two functions often appear in the WHERE clause.

7.LTRIM (S1,S2), RTRIM (S1,S2), TRIM (S1,S2)

1) Delete string S1 to the left of string s2

2) Delete string S1 to the right of the string s2

3) Delete string S1 left and right ends of string s2

8.REPLACE (s1,s2 ", S3") function

The function replaces all S2 strings that appear in the S1 string with the S3 string and returns the new replaced string.

9.SUBSTR (S,i, "J")

Oracle Common system functions

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.