mysql data type conversion

MySQL data type conversion:
1. How to convert int type numbers into strings and convert strings into int
MySQL numeric type conversion functions (concat/cast).
1. Convert Int to varchar, often use the concat function, such as concat(8,'0') to get the string '80'.
2. Convert varchar to Int and use cast(a as signed) a is a string of varchar type.
Summary: Type conversion is the same as SQL Server, except that the type parameters are a little bit different: CAST (xxx AS type), CONVERT (xxx, type).
Extended information:
Available types:
binary, with the effect of binary prefix: BINARY
character type, with parameters: CHAR()

Guess you like

Origin blog.csdn.net/weixin_42041819/article/details/112402184