The following example is for creating a simple delete stored procedure. You can run it through an explicit call from a host language program.
DROP PROCEDURE IF EXISTS `sp_students_DELETE_byPK`
GO
CREATE PROCEDURE sp_students_DELETE_byPK
(
IN p_student_id INT(11)
)
BEGIN
DELETE FROM students
WHERE student_id = p_student_id ;
END
GO
To run the stored procedure you need to supply a values to the applicable variables.
/***
IN p_student_id INT(11)
***/
CALL sp_students_DELETE_byPK
(
25
)
GO
