Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Summary of functions that can be used by mysql query statements

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

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.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report