表table1中字段id值为 '010101*'
现要将该id值转换为数字类型转存入table2select cast(id as signed) from table1;
可以正常执行查出 10101create table table2
(select cast(id as signed) from table1);
报[Err] 1292 - Truncated incorrect INTEGER value: '010101*'
求解!!!!!!!!!!!!
现要将该id值转换为数字类型转存入table2select cast(id as signed) from table1;
可以正常执行查出 10101create table table2
(select cast(id as signed) from table1);
报[Err] 1292 - Truncated incorrect INTEGER value: '010101*'
求解!!!!!!!!!!!!
解决方案 »
- 初学mysql存储过程,帮我看看哪里错了~~~
- 如何发布带有mysql数据库的应用程序?
- select like 能不能按like匹配数量的多少来排列
- 给出一个字符串,如何在数据表中查询与之匹配的正则表达式?
- 百分求个sql句子,需求很明确.目的很简单. - -
- mysql在unix下字符集问题
- 有关pgaccess的问题,大家帮个忙
- 请教:这个日期查询的SQL如何写?
- 一个update问题
- 求助SQL语言优化必定!
- mysql->一个数据库里有两个表结构一样的表,我想复制一个表的内容到另一个表里,但是如果更新第一个表再复制的话第二个表不会更新这是为什么呢
- 如何将A机mysql数据库数据完整移植到B机的mysql数据库中?
+---------+
| 010101* |
+---------+
| 010101* |
+---------+
1 row in set (0.00 sec)mysql> select '010101*'+0;
+-------------+
| '010101*'+0 |
+-------------+
| 10101 |
+-------------+
1 row in set, 1 warning (0.00 sec)mysql>
http://topic.csdn.net/u/20090501/15/7548d251-aec2-4975-a9bf-ca09a5551ba5.html
http://topic.csdn.net/u/20100428/09/BC9E0908-F250-42A6-8765-B50A82FE186A.html
http://topic.csdn.net/u/20100626/09/f35a4763-4b59-49c3-8061-d48fdbc29561.html8、如何给分和结贴?
http://community.csdn.net/Help/HelpCenter.htm#结帖