Truncated incorrect DOUBLE value

我有点傻……

sql update语法,修改的字段之间要用,连接,而不是and

否则就会报错Truncated incorrect DOUBLE value……

如:

update teacher set IMAGE_URL = #{1} and UPDATE_TIME=now() where TEACHER_MOBILE = #{0}  错误

update teacher set IMAGE_URL = #{1},UPDATE_TIME=now() where TEACHER_MOBILE = #{0}  正确

基础很重要!

时间: 2024-10-13 21:07:52

Truncated incorrect DOUBLE value的相关文章

Mybatis Data truncation: Truncated incorrect DOUBLE value: '*'

具体异常信息如下: org.springframework.dao.DataIntegrityViolationException: ### Error querying database. Cause: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Truncated incorrect DOUBLE value: '*' 错误代码如下: 解决办法: 在mybatis中的遇到这种拼接的情况,应该使用concat函数 数据库用的是mys

Truncated incorrect DOUBLE value: 'deleted'

注意 sql update的语法啊 已经被这个问题纠结过N次了, 每次都搞得头晕眼花 sql = "update netpro_sys_subindex set index_states='deleted' and snapshot_name='"+ snapshotName +"' where sid="+ tmpSid +" and del_flg=0"; statement.executeUpdate(sql); 不能用and啊,应该是,

Caused by: com.mysql.jdbc.MysqlDataTruncation: Data truncation: Truncated incorrect DOUBLE value: 'L

1.错误描述 [ERROR:]2015-06-08 09:49:42,523 [异常拦截] org.hibernate.exception.DataException: error executing work at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:69) at org.hibernate.exception.internal.Stand

mysql 1292错误:Warning 1292 Truncated incorrect DOUBLE value:

问题:执行如下语句时出现大量Warning 1292 mysql> UPDATE show_info INNER JOIN show_like ON show_like.show_id = show_info.show_id SET show_info.status = 0 WHERE show_like.show_id = 1 AND show_like.cid = 'taobao_mecity'; Query OK, 0 rows affected, 99 warnings (0.00 se

Data truncation: Truncated incorrect DOUBLE value错误的解决方案

Data truncation: Truncated incorrect DOUBLE value错误的解决方案: 当在修改某条单位记录时,发生了Data truncation: Truncated incorrect DOUBLE value错误,该如何解决: 步骤1:找到单位对应的实体对象的hbm配置文件,如unit.hbm.xml,person.hbm.xml 步骤2:把配置文件里的一对多的属性全部去掉,或者多对一的属性去掉,如 unit.hbm.xml去掉的内容如下: <set name

mysql - Truncated incorrect DOUBLE value: &#39;undefined&#39;

mysql - Truncated incorrect DOUBLE value: 'undefined' 我是怎么遇到这个问题的? 我要从多个表里,查询统计数据,保存到统计表里,需要执行下面这种结构的 sql 语句: insert into table1 select (select count(*) from t1 where ...) c1, select (select count(*) from t1 where ...) c1 单独执行 select (select count(*)

mysql执行update语句时报错:Data truncation: Truncated incorrect DOUBLE value: &#39;null&#39;

出现这个问题的原因网上有说是update的参数连接符要用,而不是and,但是我遇到的不是这个. 我出现问题的原因是,在update语句的where中varchar类型的字段我直接用了数字类型 update address set province = '北京' where userId = 250; userId是varchar类型的,报错Data truncation: Truncated incorrect DOUBLE value: 'null' 改成这样就可以了 update addre

mysql修改Truncated incorrect DOUBLE value:

UPDATE shop_category SET name = 'Secolul XVI - XVIII' AND name_eng = '16th to 18th centuries' WHERE category_id = 4768 category_id mediumint(8) name varchar(250) name_eng varchar(250) 执行报错 1292 - Truncated incorrect DOUBLE value: 'Secolul XVI - XVIII

ERROR 1292 (22007): Truncated incorrect DOUBLE value: &#39;asfsda1&#39;

mysql> UPDATE financial_sales_order SET ASSIGN_TIME = '2018-05-02 00:00:00' where CUSTOMER_ID=3541535;ERROR 1292 (22007): Truncated incorrect DOUBLE value: 'asfsda1'mysql> desc financial_sales_order;+-------------------+--------------+------+-----+-