CREATE PROCEDURE syntax
CREATE
[DEFINER = { user | CURRENT_USER }]
PROCEDURE sp_name ([proc_parameter[,...]])
[characteristic ...] routine_body

proc_parameter:
[ IN | OUT | INOUT ] param_name type

CREATE FUNCTION syntax
CREATE
[DEFINER = { user | CURRENT_USER }]
FUNCTION sp_name ([func_parameter[,...]])
RETURNS type
[characteristic ...] routine_body

func_parameter:
param_name type

CREATE PROCEDURE and CREATE FUNCTION require the CREATE ROUTINE privilege. They might also require the SUPER privilege, depending on the DEFINER value.

DROP PROCEDURE and DROP FUNCTION Syntax: this statement is used to drop a stored procedure or function.

DROP {PROCEDURE | FUNCTION} [IF EXISTS] procedure_or_function_name

Specifying a parameter as IN, OUT, or INOUT is valid only for a PROCEDURE. For a FUNCTION, parameters are always regarded as IN parameters. An IN parameter passes a value into a procedure. An OUT parameter passes a value from the procedure back to the caller. Its initial value is NULL within the procedure, and its value is visible to the caller when the procedure returns. An INOUT parameter is initialized by the caller, can be modified by the procedure, and any change made by the procedure is visible to the caller when the procedure returns.
Lets see a simple stored procedure using OUT parameter:

CREATE PROCEDURE jumlah( out juml int ) BEGIN SELECT count( * )
INTO juml
FROM FUNCTIONS;
END

Note: The example uses the mysql client delimiter command to change the statement delimiter from ; to // while the procedure is being defined. This allows the ; delimiter used in the procedure body to be passed through to the server rather than being interpreted by mysql itself.
And now how to CALL the procedure? Lets see this query:

CALL jumlah(@a);
SELECT @a ;

If you want to see the that procedure is exists on your server, you can try to Export as a sql and check the structure especially Add CREATE PROCEDURE / FUNCTION. On the bottom you will see the procedure you have been created:

– Procedures

DELIMITER $$

CREATE DEFINER=`root`@`localhost` PROCEDURE `jumlah`( out juml int )
BEGIN SELECT count( * )
INTO juml
FROM FUNCTIONS;
END$$


DELIMITER ;

And then the syntax to drop the procedure if you want to trash it:
DROP PROCEDURE IF EXISTS jumlah

Lets see a simple function:

CREATE FUNCTION fungsi(
aCHAR( 10 )
) RETURNS CHAR( 20 ) DETERMINISTIC RETURN CONCAT( 'Fungsi, ', a, '.' ) ;

Then try to execute that query like this to see the result:

SELECT fungsi('test only');

Like procedure above you can see the function by Export as sql and the bottom look view:

CREATE DEFINER=`root`@`localhost` FUNCTION `fungsi`(a CHAR(10)) RETURNS char(20) CHARSET latin1
DETERMINISTIC
RETURN CONCAT(‘Fungsi, ‘,a,’.')

And then the syntax to drop the procedure if you want to trash it:

DROP FUNCTION IF EXISTS fungsi

Well improve your self with aother case and develop yours.