Doubt in Stored Procedure MySql - how to return multiple values for a variable ?

Posted by Eternal Learner on Stack Overflow See other posts from Stack Overflow or by Eternal Learner
Published on 2010-05-17T16:06:56Z Indexed on 2010/05/17 16:10 UTC
Read the original article Hit count: 266

Hi,

I have a stored procedure below. I intend this procedure to return the names of all the movies acted by an actor.

 Create Procedure ActorMovies(
  In ScreenName varchar(50),
  OUT Title varchar(50)
  )
  BEGIN
  Select MovieTitle INTO Title  
   From Movies Natural Join Acts 
   where Acts.ScreenName = 'ScreenName ';
 End;

I make a call like Call ActorMovies(' Jhonny Depp',@movie);

Select @move; 

The result I get is a Null set , which is not correct.I am expecting a set of movies acted by Jhonny Depp to be returned. I am not sure as to why this is happening?

© Stack Overflow or respective owner

Related posts about mysql-stored-procedure