Skip to main content

DROP AGGREGATE (SQL)

Deletes a user-defined aggregate function.

Synopsis

DROP AGGREGATE [IF EXISTS] name

Description

The DROP AGGREGATE command deletes a user-defined aggregate function (UDAF). A user-defined aggregate function is created using the CREATE AGGREGATE command.

If you attempt to drop a UDAF that does not exist, SQL issues an SQLCODE -428 error, with a message such as: User Defined Aggregate Function Sample.SecondHighest does not exist.

Dropping a UDAF automatically purges any cached queries that reference that UDAF.

Arguments

name

The name of the user-defined aggregate function to be deleted. The name can be qualified (schema.aggname), or unqualified (aggname). An unqualified name takes the default schema name.

See Also

FeedbackOpens in a new tab