MySQL Forums
Forum List  »  Newbie

Re: Select into Varirable in Stored Procedure in mysql
Posted by: Rahul Chaudhari
Date: June 24, 2005 03:47AM

Rahul Chaudhari wrote:
> i want to say these still i'm not getting the
> answer can any body help me out please
>
> delimiter $$
>
> DELIMITER $$
>
> drop procedure if exists test_proc$$
> create procedure test_proc
> (
> out o_Value varchar(1000), out O_OutputMessage
> varchar(100)
> )
> Begin
> declare v_string varchar(100);
> declare v_cnt integer;
>
> set v_string = concat('select count(*) into
> ',v_cnt,' from employee where department_id =
> 10');
>
> if v_cnt = 0 then
> set O_OutputMessage ='Success';
> else
> set O_OutputMessage ='wrong';
> end if;
>
> set o_Value = v_string;
>
> END$$
>
> delimiter ;


select into in not working here it's returning NULL value why

Options: ReplyQuote


Subject
Written By
Posted
Re: Select into Varirable in Stored Procedure in mysql
June 24, 2005 03:47AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.