when i GOOGLED about IN parameter i got this..
the value of an IN parameter is protected. It means that even if the value of the IN parameter is changed inside the procedure, its original value is retained after the procedure ends (like pass by value).
i didn't understand the context of above search result
i tried this code but the original value is changed from 1 to 2.
delimiter //
CREATE PROCEDURE MyProcedure(IN myParameter INT)
BEGIN
-- Output the original value
SELECT myParameter AS 'OriginalValue';
-- Rest of the code
-- Modify the parameter value (which should be avoided)
SET myParameter = myParameter + 1;
-- Output the modified value
SELECT myParameter AS 'ModifiedValue';
END //
delimiter ;
call myprocedure(1);