Oralce functions substr and mysql functions substring_index note ???? Recently, I occasionally saw the substring_index function in the mysql database. First, I would like to briefly introduce the substring_index function of mysql .???
Both the substr function and the substring function are used to extract the "substring" from a "parent string. However, there are some differences in usage.
Substr Method
Definition and usage
The substr method returns a substring of the specified
This article mainly introduces details about how to use substr, substring, indexOf, lastIndexOf, split, and replace in js. For more information, see indexOf () returns the position of the first occurrence of a specified string value.
The
This article mainly introduces details about how to use substr, substring, indexOf, lastIndexOf, split, and replace in js. For more information, see indexOf () returns the position of the first occurrence of a specified string value.
The
In js, both substring and substr are used to intercept strings. What is the specific difference between substring and substr? Is there any difference, next, I will introduce some instances to introduce these problems.
Substring Method
The substring
Oracle (replace + substr) function used in combination, oraclesubstr
select replace('33021622221111',substr('33021622221111',7,4),9527) from dual;
How to Use the substr function in oracle
SubstrTruncates string functions in
The IndexOf () method returns the location of the first occurrence of a specified string value in a string.
The LastIndexOf () method returns the last occurrence of a specified string value, which is searched forward at the specified position in a
The split string is a number of linesExample one: Require that ' king ' in the table emp be split into four lines per line of wordsNote: substr (str,pos): intercepts the character at the beginning of POS position;SUBSTR (Str,pos,len): Selects the
1) substr function format (commonly known as: intercept function)Format 1:substr (string string, int a, int b);Format 2:substr (string string, int a);Explain:Format 11. String to be intercepted by string2. A intercept the starting position of the
Perl substr () Function example, substr () function instance code-returns the substring of expr, starting with offset within the string.
Grammar:
Substr EXPR, OFFSET, LEN, replacementSubstr EXPR, OFFSET, LENSubstr EXPR, OFFSET
Definitions and
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.