Oracle function INSTR usage

Source: Internet
Author: User
Oracle function INSTR usage: (source string, target string, start position, matching serial number) in OraclePLSQL, The instr function returns the string to be truncated in the source string

Oracle function INSTR usage: (source string, target string, start position, matching serial number) in Oracle/PLSQL, instr function returns the string to be truncated in the source string

Oracle function INSTR usage:

(Source string, target string, start position, matching serial number)

In Oracle/PLSQL, The instr function returns the position of the string to be truncated in the source string. Only retrieval once, that is, starting from the character

It ends at the end of the character.

Syntax:

Instr (string1, string2 [, start_position [, nth_appearance])

Parameter Analysis:

String1

Source string to be searched in this string.

String2

The string to be searched in string1.

Start_position

Position of string1. This parameter is optional. If omitted, the default value is 1. The string index starts from 1. If this parameter is positive, it is retrieved from left to right. If this parameter is negative, from right to left, the string to be searched starts Indexing in the source string is returned.

Nth_appearance

This parameter is optional. If omitted, the default value is 1. If it is negative, an error is returned.

Note:

If String2 is not found in String1, The instr function returns 0.

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.