SHOW CREATE PROCEDURE
SHOW CREATE PROCEDURE procedureThis statement displays an SQL statement that can be used to create a stored procedure like the one given. It’s useful for displaying the SQL statements that are performed by the stored procedure.
Here is an example of a procedure that was created with the CREATE PROCEDURE statement earlier in this chapter:
SHOW CREATE PROCEDURE students_copy_proc \G
*************************** 1. row ***************************
Procedure: students_copy_proc
sql_mode:
Create Procedure: CREATE DEFINER=`root`@`localhost`
PROCEDURE `students_copy_proc`(IN ref_note VARCHAR(255))
BEGIN
REPLACE INTO students_backup
SELECT *, ref_note FROM students;
END