Skip to main content

DROP PROCEDURE

Introduced or updated: v1.2.637

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));
Explore Databend Cloud for FREE
Low-cost
Fast Analytics
Easy Data Ingestion
Elastic Scaling
Try it today