SQL Out Parameter
SQL Out Parameter allows the stored procedure to the pass data value back to the invoker.
Understand with Example
The Tutorial illustrate an example from SQL Out Parameter .In this Example we create a procedure 'abc'. The parameter taken into the procedure is OUT parameter. The OUT parameter allows the stored procedure to pass the value and pass back to the invoker.
Create Procedure
delimiter $$ create procedure abc(OUT x int) BEGIN SET x = 10; END$$ delimiter ; |
Call Procedure
call abc(@y); |
Fetch Value
Select @y; |
Result
+------+ | @y | +------+ | 10 | +------+ |