To remove a stored procedures, use the DROP statement : Procedure « Procedure Function « MySQL Tutorial






DROP PROCEDURE [database.]<procedure name>
mysql>
mysql>
mysql>
mysql> DELIMITER //
mysql> CREATE PROCEDURE myProc (IN in_count INT)
    -> BEGIN
    ->     DECLARE count INT default 0;
    ->
    ->     increment: LOOP
    ->     SET count = count + 1;
    ->     IF count < 20 THEN ITERATE increment; END IF;
    ->     IF count > in_count THEN LEAVE increment;
    ->     END IF;
    ->     END LOOP increment;
    ->
    ->     SELECT count;
    -> END
    -> //
Query OK, 0 rows affected (0.00 sec)

mysql> DELIMITER ;
mysql>
mysql> call myProc(5);
+-------+
| count |
+-------+
|    20 |
+-------+
1 row in set (0.00 sec)

Query OK, 0 rows affected (0.00 sec)

mysql>
mysql>
mysql> drop procedure test.myProc;
Query OK, 0 rows affected (0.00 sec)

mysql>
mysql>
mysql>








11.5.Procedure
11.5.1.The CREATE PROCEDURE Statement
11.5.2.You can set parameters for a stored procedure
11.5.3.Using an OUT parameter.
11.5.4.The stored procedure characteristics include a number of options for how the stored procedure behaves.
11.5.5.Creating a Single-Statement Procedure
11.5.6.Calling a Single-Statement Procedure
11.5.7.Creating a Multistatement Stored Procedure
11.5.8.The ALTER statement lets you change the characteristics of a stored procedure
11.5.9.To remove a stored procedures, use the DROP statement
11.5.10.ALTER PROCEDURE and ALTER FUNCTION Syntax
11.5.11.DROP PROCEDURE and DROP FUNCTION Syntax
11.5.12.Stored Procedure Permissions