SELECT INTO Multiple Variable in MySQL declaration -
is possible set 2 parameters value in single query in stored procedure mysql? want , 2 different parameters output , don't want con-cat it.
declare v_first_name varchar(100); declare v_last_name varchar(100); set p_email_id = 'some_email_id'; /* instead of want laod result in single query set v_first_name=(select first_name user_master email_id=p_email_id); set v_last_name=(select last_name user_master email_id=p_email_id); */ if flag1=1 select 1 'result',v_first_name 'first_name',v_last_name 'last_name'; else select 0 'result',v_first_name 'first_name',v_last_name 'last_name'; end if;
any ?
select first_name @v_first_name , last_name @v_last_name user_master email_id=p_email_id; ==== **not working**
just list them out commas after into
:
select a, b, c v_a, v_b, v_c ...
Comments
Post a Comment