int unsigned实验

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

原文地址:https://www.cnblogs.com/gaoquan/p/5821986.html