You can set parameters for a stored procedure : Procedure « Procedure Function « MySQL Tutorial






[IN|OUT|INOUT] <name> <data type>

If you don't specify IN, OUT, or INOUT for the parameter, it will default to IN.

An IN parameter is passed into the stored procedure to use internally.

An OUT parameter is set within the procedure, but accessed by the caller.

An INOUT parameter is passed into the procedure for internal use, but is also available to the caller after the procedure has completed.

The name and data type of the parameter are used in the stored procedure for referencing and setting values going in and out of the procedure.

The data type can be any valid data type for MySQL.









11.5.Procedure
11.5.1.The CREATE PROCEDURE Statement
11.5.2.You can set parameters for a stored procedure
11.5.3.Using an OUT parameter.
11.5.4.The stored procedure characteristics include a number of options for how the stored procedure behaves.
11.5.5.Creating a Single-Statement Procedure
11.5.6.Calling a Single-Statement Procedure
11.5.7.Creating a Multistatement Stored Procedure
11.5.8.The ALTER statement lets you change the characteristics of a stored procedure
11.5.9.To remove a stored procedures, use the DROP statement
11.5.10.ALTER PROCEDURE and ALTER FUNCTION Syntax
11.5.11.DROP PROCEDURE and DROP FUNCTION Syntax
11.5.12.Stored Procedure Permissions