时间:2021-07-01 10:21:17 帮助过:25人阅读
CAST (expr AS type)
BINARY # 二进制字符串
CHAR(n) # 普通字符串
DATE # 日期字符串
DATETIME # 时间日期字符串
DECIMAL(m,n) # 精确浮点数
SIGNED # 整数(有正负)
TIME # 时间字符串
UNSIGNED # 整数(正数)
mysql> select cast(‘25‘ as signed);
+----------------------+
| cast(‘25‘ as signed) |
+----------------------+
| 25 |
+----------------------+
mysql类型转换
标签:mysql类型转换