In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
MySQL in how to customize the function, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain in detail for you, people with this need can come to learn, I hope you can gain something.
Control flow function
Case...when
The return value is judged according to the value, and the IF-ELSE judgment in analogical programming.
If (expr1,expr2,expr3)
If the expression expr1 is TRUE, the return value of IF () is expr2;, otherwise the return value is expr3.
Ifnull (expr1,expr2)
If the expression expr1 is not NULL, the return value is expr1; otherwise the return value is expr2.
Commonly used string function
CHAR_LENGTH ()
The return value is the length of the string.
CONCAT (str1...)
Concatenate concatenated strings.
ELT (NMagneStr1, str2, and...)
If Number1, the return value is str1, if Number2, the return value is str2, and so on, it can be used to transform the state of the returned page.
FORMAT (XBI D)
Format the numeric type.
TRIM (str)
Clear the string space.
Numerical function
FLOOR (X)
Returns the maximum integer value not greater than X.
MOD (NMagol M)
Module operation. Returns the remainder of N divided by M.
RAND () RAND (N)
Returns a random floating-point value ranging from 0 to 1. If an integer parameter N is specified, it is used as a seed value to generate repetitive sequences.
Time and date function
ADDDATE (date,INTERVALexprtype)
Give a specified date to operate on the specified type.
CURDATE ()
Returns the current date as a value in 'YYYY-MM-DD' or YYYYMMDD format, depending on whether the function is used in a string or numeric context.
DATE (expr)
Extract the date portion of the date or time date expression expr.
DATE_FORMAT (date,format)
Format the date value according to the format string.
Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.