MySQL uses string Truncation in MySQL when creating a view today, which is very convenient. 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
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
MySQL string function truncation method bitsCN.com
MySQL uses string truncation in MySQL when creating a view today, which is very convenient. I feel that the string function of MySQL intercepts characters, which is more powerful than program
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.
MySQL string Truncation
MySQL string Truncation
1. Extract strings from the leftLeft (str, length)Note: left (truncated field, truncated length)Example: select left (content, 200) as abstract from my_content_t
2. Extract strings from the rightRight (
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)
ASP function Encyclopedia
ASP functions are similar to VBScript, and here are some common functions
Array ()
function returns an array of
Expression Array (list)
Allow data types: characters, numbers can
Example:
Dim MyArray (
Function:1. Intercept string from leftLeft (str, length)Description: Left (truncated field, intercept length)Example: Select Left (content,200) as abstract from my_content_t2, starting from the right to intercept the stringRight (str,
---restore content starts---1. How to make a row and column conversionDemand:Column conversion rowsSelect a. ' User_name ', sum (b.kills) from User1 a join User_kills bOn a.id = b.user_id GROUP by A.user_name;-Rows converted to columnsSelect sum
1. Intercept string from leftLeft (str, length)Description: Left (truncated field, intercept length)Example: Select Left (content,200) as abstract from my_content_t2, starting from the right to intercept the stringRight (str, length)Description:
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:
1. Intercept string from leftLeft (str, length)Description: Left (truncated field, intercept length)Example: Select Left (content,200) as abstract from my_content_t2, starting from the right to intercept the stringRight (str, length)Description:
Tag:os strong sql mysql string rom rac ef 1, intercepts the string from the left, and the leftmost (str, length) Description: Ieft (truncated field, intercept length) Example: Select Left (content,200) as abstract
String stands for strings, and in Java all string literals are implemented as instances of this classCharacter of the string and simple analysis of the principle: Packagedemo;/** Features of the String class: * All "" is a String object * Once
Adoquery1. FIELDDEFS[1]. Name; Field namedbgrid1.columns[0].width:=10; Field width of DBGridAdoquery1. Fields[i]. datatype=ftstring field typeUpdate JB_SPZL set Kp_item_name=upper (kp_item_name) modifies a column in a database table in
The definition of an array: In memory, a piece of space that continuously stores the same type of data.To define an array:int a[]=new int[array length]; Example: int a[]= new INT[5];Can also be written as:int []a=new int[array length]
Modified: MW [memory address] [value] [length]Example: MW 0x02000000 0 128Represents a memory value of 0 that modifies the address to 0x02000000~0x02000000+128.Display: MD [memory address] [length]Example: MD 0x02000000 128Represents the memory data
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);
SUBSTR (str,start,length);
Example: substr (' PHP tutorial 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
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.