SQL Flow Field Guide

DROP FUNCTION

Catalog support for SQL Server 2022 (16.x) and 2025 (17.x)

removes a scalar, inline table-valued, or multi-statement table-valued function

What changes

Input
module body (its own statements and their sources)
Output or change
module definition

Syntax at a glance

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

Work example

A function is removed after its callers and dependent modules migrate.

Search modules, jobs, views, permissions, and application code for the function name.

Check your work No deployed caller needs the function and the replacement passes the same output checks.

Open Microsoft Learn for full syntax, permissions, and details for your version.