我如何进行一项操作在我执行这样的查询之间:
types.init 和 types.end 是一个无符号数,对于这种情况B.init=0 and B.end=0
SET @init:=20;
SET @end:=100;
SELECT
A.`type_id`, B.`type_id`,count(A.id)
FROM
`types` A ,`types` B
WHERE
A.`init` BETWEEN B.`init`- @init
AND B.`init` + @init
AND A.`end` BETWEEN B.`end`- @end
AND B.`end` + @end
然后发生此错误:
#1690 - BIGINT UNSIGNED value is out of range in '(`database`.`B`.`init` - (@init))'