Syntax

DROP AGGREGATE [ IF EXISTS ] function_name [ ( argument_type [, ...] ) ] ;
Parameter or clauseDescription
function_nameName of the UDAF you want to drop.
( argument_type [ , … ] )Optional: Argument types of the function.Specify the argument types when the name of the function you want to drop isn’t unique within the schema.
IF EXISTSDo not return an error if the specified function does not exist. A notice is issued in this case.

Usage

A function can be dropped using one of the following methods:

  • Full function signature:
DROP AGGREGATE function_name ( argument_type [, ...] );
  • Function name only, if it’s unique in its schema:
DROP AGGREGATE function_name;

You can run SHOW FUNCTIONS; to list all existing UDFs to see if a function name is unique.

See also