mysql error 1292 when using cast in update statement

前端 未结 3 2010
南笙
南笙 2021-01-22 11:56

The below statement returns \"Error Code: 1292. Truncated incorrect INTEGER value: \'95.00\' 1.132 sec \"

update new2006 set new2006.emp=cast(emp as unsigned)          


        
3条回答
  •  孤城傲影
    2021-01-22 12:08

    Try this

    update IGNORE new2006 set new2006.emp=cast(emp as unsigned) where IsNum(emp)=0;
    

提交回复
热议问题