不能像sqlserver一样用if not exists或者exists,应该这样:
DECLARE p_count int; set p_count=0; select 1 into p_count FROM basic_Character WHERE AreaName = p_areaName AND AccountName = p_accountName AND CharacterName = p_characterName limit 1; if p_count=1 then .... else .... end if;