Removes one or more user-defined functions from the current database.
drop function{ [ owner_name . ] function_name } [ ,...n ]
is the name of the user ID that owns the user-defined function. Must be an existing user ID.
is name of the user-defined function to be removed. Specifying the owner name is optional; the server name and database name cannot be specified.
Drops the bonus function:
drop function bonus
drop function drops scalar SQL user-defined functions from your current database.
The permission checks for drop function differ based on your granular permissions settings.
Granular permissions enabled |
With granular permissions enabled, you must be the function owner or a user with drop any function privilege. |
Granular permissions disabled |
With granular permissions disabled, you must be the function owner or a user with sa_role. Permissions are not transferable. |