create table t1(a int unsigned,b int unsigned);

insert into t1 select 1,2;

select 1-2 from t1;
Error Code: 1690. BIGINT UNSIGNED value is out of range in '(study.t1.a - study.t1.b)'

set sql_mode='NO_UNSIGNED_SUBTRACTION';

select a-b from t1;
-1

posted on 2016-08-30 14:47  高权  阅读(131)  评论(0编辑  收藏  举报