DROP FUNCTION — Removes the definition of a SQL function.
DROP FUNCTION function-name [IF EXISTS]
The DROP FUNCTION statement deletes the definition of the specified user-defined function. Note that, for functions declared using CREATE FUNCTION and a class file, the statement does not delete the class that implements the function, it only deletes the definition. To remove the Java class that contains the associated function method, you must first drop the function definition then use the sqlcmd remove classes directive to remove the class.
The IF EXISTS clause allows the statement to succeed even if the specified function name does not exist. If the function does not exist and you do not include the IF EXISTS clause, the statement will return an error.