Knowledge Walls
John Peter
Pune, Maharashtra, India
Stored Procedure in Mysql of Code Template
3938 Views
Create Procedure
DELIMITER $$

CREATE PROCEDURE procedure_name(IN input_variable_name.... data-type,OUT output_variables... data-type)
BEGIN
      -- statements

END
$$
Show procedure source
-- To see specific procedure source
SHOW CREATE PROCEDURE procedure_name;

-- To see all procedures
SHOW PROCEDURE STATUS;

-- To see all procedures in another way
SELECT * FROM `mysql`.`proc`;
SELECT * FROM `mysql`.`proc` WHERE db = 'database_name';

-- To see all procedures with filter
SHOW PROCEDURE STATUS WHERE Db = "database_name";
Drop Procedure
DROP PROCEDURE procedure_name;
Or
DROP PROCEDURE IF EXISTS procedure_name;
Previous Topics
Previous lessons of current book.
  Copyright © 2014 Knowledge walls, All rights reserved
KnowledgeWalls
keep your tutorials and learnings with KnowledgeWalls. Don't lose your learnings hereafter. Save and revise it whenever required.
Click here for more details