PREPARE stmt FROM @query; SET @c1 = Param1; EXECUTE stmt USING @c1; DEALLOCATE PREPARE stmt; SET Param2 = @c2; SET Param3 = @c3; END$$ DELIMITER ; -- Call procedure and use variables SET @Param1 = 2; SET @Param2 = ''; SET @Param3 = ''; CALL procedure1(@Param1, @Param2, @Param3); SELECT @Param2, @Param3; +---------+---------+ | @Param2 | @Param3 | +---------+---------+ | value3 | value4.
1 Thanks Devart.... this is the answer... Thanks again for your effort... – Kushan Hasithe Fernando Apr 8 at 8:27.
Select count(*) into @numOfRecords from .... You have do declare the variable within stored procedure I hope I've understood your question.
I generate a dynamic query in My sql Stored procedure. I wanna get the result of this query into a out parameter. How to do this?
How to get the output of the query1 into OUT parameter(numOfRecords )?
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.