SET CheckMessage = CONCAT(CheckMessage,'请填写正确的手机号');
select CheckMessage;
输出为null
深入了解过后发现CONCAT(a,b)中有一个值为null时 CONCAT(a,b)=》null
所以解决办法:
SET CheckMessage = CONCAT(IFNULL(CheckMessage,'1'),'请填写正确的手机号');