传送门
set @count = (SELECT count(1) from t_b_cardgroup WHERE t_u_user_id=126);DROP PROCEDURE IF EXISTS judgeGroup; delimiter //CREATE PROCEDURE judgeGroup(INOUT p int)BEGIN SELECT p;-- p=0 if p=0 then SELECT 111 from dual; else SELECT 222 from dual; end if;end//CALL judgeGroup(@count);