Oracle's use of the SUBSTR functionGets a string that specifies the starting position and length of the string substr (string, start_position,[length] )Such as:SUBSTR ('This is a test', 6, 2) wouldreturn ' is'SUBSTR ('This is a test', 6) wouldreturn
SUBSTR (string, intercept start position, intercept length)//return intercepted wordsubstr (' Hello World ', 0, 1)//return result is ' H ' * start with a string of length 1 from the first charactersubstr (' Hello World ', 1, 1)//Returns the result
SUBSTR (string, intercept start position, intercept length)//return intercepted wordsubstr (' Hello World ', 0, 1)//return result is ' H ' * start with a string of length 1 from the first charactersubstr (' Hello World ', 1, 1)//Returns the result
Oracle's use of the SUBSTR functionGets the string substr (string, start_position, [length]) that specifies the starting position and length in the stringSuch as:SUBSTR (' This was a test ', 6, 2) would return ' is 'SUBSTR (' This was a test ', 6)
substr (string, intercept start position, intercept length) //Returns the truncated string (containing the start position)Select substr (' HelloWorld ', 0,3) value from dual; --The returned result is Helselect substr (' HelloWorld ', 1,3) value
This article introduces how to use the substr () string truncation function in oracle and plsql. If you need it, you can refer to it.
Syntax
The Code is as follows:
Copy code
Substr (string, start_position, [length])
PHP is our most commonly used dynamic development Web page language, string processing in programming is the longest use, we are here to discuss the use of PHP substr in detail. There is a bunch of strings similar to the following variable $abc, the
Oracle:
Syntax:
Substr (string, a, B ):
A: Starting from the nth digit, the first digit a = 1,Last Third digit (right in sqlserver) a =-3
B: Several Characters[SQL]
Substr ('This is a Test', 6, 2) wowouldReturn 'Is'
Substr ('This is a Test', 6)
substr (PHP is very good language,4,5);
The output is the is ve;
Copy Code1, when the length of the START>STR, then returns to ();
substr (PHP is very good language,26,5);
substr (PHP is very good
SUBSTR ();
SUBSTR (str,start,length);
Example: substr (PHP is very good language,4,5);
The output is the is ve;
When the length of the START>STR, it is returned as ();
substr (PHP is very good language,26,5);
substr (PHP is very good language,4);
Today, a customer needs to generate 400 phone numbers in batches at the starting position of 10000. At the beginning, I directly generate a number such as 10004, but merchants do not like this number, the number indicating that the ending number is 4
One of the most important techniques in PHP is to intercept specified characters in a specified string. PHP can use the PHP pre-defined function substr () for string truncation. One of the most important techniques in PHP is to intercept specified
This article mainly introduces PHP substr () and explode () function usage analysis, in the form of an instance of the substr () and explode () function to deal with the string of skills, is the use of high frequency function in string operation,
PHP is the most commonly used language for dynamic development of web pages. string processing is the most commonly used language in programming. Here we will discuss in detail the use of PHP substr. There are a bunch of strings similar to the
/*String substr (string $ string, int $ start [, int $ length]), which can be used to search for matched strings or characters in a long string. $ String is the string to be processed, $ start is the start position, and $ length is the length to be
Grammar
The code is as follows
Copy Code
substr (String, start_position, [length])
The string is the source string.
Start_position is the location of the extraction. The first position in the string is always 1
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 younger brother not to tidy up the use of substr function, do a few examples to solve the confusion of the new, master please drift over.
Let's take a look at the syntax of the PHP substr function:
String substr (string string, int start, int
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.