MySQL Forums
Forum List  »  Stored Procedures

Store Procedure and Input Parameters
Posted by: Bing Li
Date: August 06, 2017 02:55AM

Hello all,

I am new to MYSQL and was creating a store proc with an update statement.

My update statement is as follows and works perfectly when i try to run it as shown below -

UPDATE test gu
SET gu.col1 = in_value
WHERE gu.col2 = in_value2
AND gu.col3 = in_value3 ;

Now i encapsulated this into a store procedure and it won't find the value and update at all. My store proc looks like this code below -


CREATE DEFINER=`glob`@`localhost` PROCEDURE `Update_TheID`(
IN `in_value` varchar(2000),
IN `in_value2` FLOAT,
IN `in_value3` FLOAT
)
LANGUAGE SQL
NOT DETERMINISTIC
CONTAINS SQL
SQL SECURITY DEFINER
COMMENT ''
BEGIN

UPDATE test gu
SET gu.col1 = in_value
WHERE gu.col2 = in_value2
AND gu.col3 = in_value3 ;

END



Not sure what i am doing wrong, any help would be appreciated.

Thanks !

Options: ReplyQuote


Subject
Views
Written By
Posted
Store Procedure and Input Parameters
4206
August 06, 2017 02:55AM


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.