DROP FUNCTION

Remove a user-defined function.

Syntax
      DROP FUNCTION [ IF EXISTS ] { [ schema_name. ] function_name } [ ,...n ]  

Key:
    schema_name    The schema to which the user-defined function belongs.

    function_name  Name of the function(s) to remove.

To run this command first remove any CHECK constraints, or DEFAULT constraints that reference the function.

Also an indexed computed column that references the function will prevent dropping the function.

Examples

DROP FUNCTION MySchema.fn_myfunction;
GO

“Form follows function” ~ Louis H. Sullivan

Related commands

CREATE FUNCTION - Create a user-defined function.
ALTER FUNCTION - Alter a user-defined function.


 
Copyright © 1999-2026 SS64.com
Some rights reserved