A procedure stored as such is a routine that contains the sql statement (s) to which it is accessed as follows
CALL nombrePA();
A simple example we have of a PA is like the following
DELIMITER //
CREATE PROCEDURE fetchAll()
SELECT * FROM users;
//
I invoke or call the PA through CALL
CALL fetchAll();
EXPLANATION
A delimiter is created with the double diagonal //
because the semicolon symbol contains the SQL statement inside the PA
However, we know that not all SQL statements are static (that is, they do not require dynamic values)
This is where the values of type come into use:
IN
: These are the values that the PA expects to receive to grant them the query that it has inside, process it and return a result OUT
: This value exists in the AP but can be modified within this same