InStr Format () function
I.: instr (string1, string2) // instr (the source string, the target string)
Case 2: instr (string1, string2 [, start_position [, nth_appearance]]) // instr (the source string, the target string, the starting position, matching serial number)
Analysis: To find the value of string2 in string1, from the values given start_position (ie: position) in the retrieval string1, string2 found in the corresponding position number)
Formats:
SELECT INSTR('HARRY JAY','A')FROM DUAL --第一次出现A的位置
A screenshot:
Format two
SELECT INSTR('HARRY JAY','A',2,2)FROM DUAL --从第二位开始,第二个A
-- 位置
Screenshot two
Reference: https: //www.cnblogs.com/dshore123/p/7813230.html