First page Back Continue Last page Image

Deleting a Stored Procedure from the server

DELIMITER //

CREATE PROCEDURE clear_invoices_credit_total

(

invoice_id_param INT

)

BEGIN

UPDATE invoices

SET credit_total = 0

WHERE invoice_id = invoice_id_param;

END//

DROP PROCEDURE clear_invoices_credit_total

DROP PROCEDURE IF EXISTS clear_invoices_credit_total

This procedure has been created so we can delete it

To Delete the Procedure just use the DROP Command

However, just like a Table or Database you may want to avoid the “Does not Exist” error by using this approach