在此代码中,当ci_ty为' QS'时,我试图输出一些数据。但是输出是NULL。有人可以帮我解决这个问题吗?
delimiter //
create procedure GetFnameAndLname(
IN ci_ty VARCHAR(45),
OUT p_id INT,
OUT f_name VARCHAR(45),
OUT l_name VARCHAR(45))
begin
select city into ci_ty
from fathi.personal;
if ci_ty = 'QS' then
select idpersonal,fname,lname into p_id,f_name,l_name
from fathi.personal;
end if;
end
call GetFnameAndLname('QS',@p_id,@f_name,@l_name);
select @p_id,@f_name,@l_name;