Alibabacloud.com offers a wide variety of articles about sql substring function example, easily find your sql substring function example information here online.
1. Intercept string from left
Left (str, length)
Description: Left (intercepted field, intercept length)
Example: Select Left (content,200) as abstract from my_content_t
2, from the right start to intercept the string
Right (str, length)
Description:
Usage of Mysql string truncation function SUBSTRING description bitsCN.com feels that MySQL string function truncation characters are more powerful than program interception (such as PHP or JAVA), so here is a record, I hope it will be useful to you.
The sense that MySQL's string function intercepts characters is more powerful than using program interception (such as PHP or Java), so make a record here and hope to be useful to everyone.
Function:
1. Intercept string from left
Left (str, length)
When creating the view today, it is very convenient to use string Truncation in MySQL.
When creating the view today, it is very convenient to use string Truncation in MySQL.
I feel that the string function of MySQL intercepts characters, which is
SUBSTRING (expression, start, length)ParametersexpressionA string, binary string, text, image, column, or an expression that contains a column. Do not use an expression that contains an aggregate function.StartAn integer or an expression that can be
I feel that the string function of MySQL intercepts characters, which is more powerful than program interceptions (such as PHP or JAVA). So I want to make a record here and hope it will be useful to everyone.Function:1. Extract strings from the left
Function:1. Intercept the string from left (str, length)Description: Left (truncated field, intercept length) Example: Select Left (content,200) as abstract from my_content_t2. Intercept string Right (str, length)Description: Right (truncated field,
It feels like MySQL's string function intercepts characters, and is more powerful than a program intercept (like PHP or Java), so make a record here and hope it works for everyone.Function:1. Intercept string from leftLeft (str, length)Description:
The substring function in SQL is used to grab a portion of a field data. The name of this function is not exactly the same in different repositories:
Mysql:substr (), SUBSTRING ()
Oracle:substr ()
SQL server:substring ()
The
Substring function is used for SQL Server operations.
Substring (expression, start, length)
ParametersExpressionString, binary string, text, image, column, or expression that contains a column. Do not use expressions that contain aggregate
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.