MySQLでCAST()とCONVERT()関数の使い方

例1
mysql> SELECT CONVERT(’67’,SIGNED);
+———————-+
| CONVERT(’67’,SIGNED) |
+———————-+
| 67 |
+———————-+
1 row in set

例2
mysql> SELECT CAST('125e342.83’ AS signed);
+——————————+
| CAST('125e342.83’ AS signed) |
+——————————+
| 125 |
+——————————+
1 row in set

例3
mysql> SELECT CAST('3.35’ AS signed);
+————————+
| CAST('3.35’ AS signed) |
+————————+
| 3 |
+————————+
1 row in set

MySQL

Posted by arkgame