MySQL Forums
Forum List  »  Stored Procedures

Re: Creating a stored procedure issues
Posted by: bill bob
Date: September 20, 2014 11:15PM

Sorry about that meant to fix the name and forgot.

CREATE TEMPORARY TABLE IF NOT EXISTS table2 AS (
select AVG(Score) as aScore, MovieCode
from UserMovies
group by MovieCode
);

UPDATE Movies
set Score =(
select aScore
from table2
where Movies.Code=table2.MovieCode );

DROP TABLE IF EXISTS table2;

Options: ReplyQuote


Subject
Views
Written By
Posted
1958
September 20, 2014 08:17PM
1039
September 20, 2014 09:05PM
Re: Creating a stored procedure issues
1036
September 20, 2014 11:15PM
989
September 21, 2014 12:39AM


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.