6.lpad,rpad
Function: The left/right string fills some specific characters
Syntax: Lpad (String, n, [pad_string])
String: But the character or argument
N: The length of the character, is the number of strings returned, if this number is shorter than the length of the original string, the Lpad function will intercept the string as a left-to-right n character; Pad_string: is an optional parameter, this string is to be pasted to the left of the string, if this argument is not written, the Lpad function will paste a space on the left side of the string.
For example
SELECT Lpad ('aaaaaaaa',5,'$') from DUAL;
Data result: AaaaA
Output Result: AaaaA
7.SUBSTR
Function: A string used to intercept strings. Returns the n characters from the start of the M bit in a char
(if m=0, start at the beginning of the string and, if negative, start at the tail)
Syntax: SUBSTR (char,m,n)
For example
selectsubstr ('Hello world! ', 7,' fromDUAL;
Output Result: world!
PS: The first count of strings starts at 1.
8.INSTR
Syntax: INSTR (char1,char2,m,n)
Function: Returns the position of the nth occurrence of the substring char2 in char1 starting from M
For example:
SELECT ('helloWorld','World ',6,2 from DUAL;
Output results: 13
PS: Parameter n can not lose, then default first occurrence position
For a moment, record the above 8 operations, and then add them later.
Oracle Database Basics _ String Operations related 2