September 22, 2009 at 3:24 PM
Stored Procedures are basically used for passing values and receiving values.It is having three parameters-IN,OUT,INOUT.
1)IN: It is default parameter which is passed to the procedure and can change inside the procedure, but remains unchanged outside.
2)OUT: This parameter does not supply any value to the procedure.It is assumed to be NULL, but it can be modified inside the procedure, and is available outside the procedure.
Try this to add two numbers:
CREATE PROCEDURE pr3(IN in_count INT,IN in1_count INT)
DECLARE num INT;
SET num =in_count + in1_count;