📣
TiDB Cloud Premium is now in public preview. Unlimited growth, instant elasticity, advanced security for enterprise workloads. Try it out →

DROP PROCEDURE



Deletes an existing stored procedure.

Syntax

DROP PROCEDURE <procedure_name>([<parameter_type1>, <parameter_type2>, ...])
  • If a procedure has no parameters, use empty parentheses: DROP PROCEDURE <procedure_name>();
  • For procedures with parameters, specify the exact types to avoid errors.

Examples

This example creates and then drops a stored procedure:

CREATE PROCEDURE convert_kg_to_lb(kg DECIMAL(4, 2)) RETURNS DECIMAL(10, 2) LANGUAGE SQL COMMENT = 'Converts kilograms to pounds' AS $$ BEGIN RETURN kg * 2.20462; END; $$; DROP PROCEDURE convert_kg_to_lb(Decimal(4, 2));

Was this page helpful?