Summary of functions that can be used by mysql query statements
Mysql query statements sometimes need to use functions, but functions are more efficient than subqueries, and sometimes functions are very convenient. Here is a brief summary of the specific usage of sql functions.
1, for the digital processing function
Avg ()
Count ()
Max ()
Min ()
Sum ()
2, handling of strings
Merge string function: concat (str1,str2,str3...)
Compare string size function: strcmp (str1,str2)
Get string byte function: length (str)
Function to get the number of characters in a string: char_length (str)
Letter case conversion function: uppercase: upper (x), ucase (x); lowercase lower (x), lcase (x)
String lookup function
Gets the substring of the specified location
String emptying function
String substitution function
The above is the most common, it is best to use fewer functions in the query statement, the efficiency will be low, when dealing with a large amount of data, you can test the article from http://www.dc3688.com.