2番目のselectステートメントから結果セットを返すにはどうすればよいですか?
私はサンプルを持っています:
-- --------------------------------------------------------------------------------
-- Routine DDL
-- Note: comments before and after the routine body will not be stored by the server
-- --------------------------------------------------------------------------------
DELIMITER $$
CREATE DEFINER=`root`@`localhost` PROCEDURE `getGender20`(in id INT)
BEGIN
DECLARE str VARCHAR(50);
select @str :=gender from memeber_info where id=id;
if (str = 'Male') then
select '12345' ;
end if;
select '123' ;
END
male
戻る必要があるときに、手順を再調整してい123
ます。これはどのように達成できますか?