SQL Flow Field Guide

ALTER PROCEDURE

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

changes a stored procedure (CREATE OR ALTER supported)

What changes

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

Syntax at a glance

ALTER { PROC | PROCEDURE } [schema_name.] procedure_name [ ; number ] [ { @parameter_name [ type_schema_name. ] data_type } [ VARYING ] [ = default ] [ OUT | OUTPUT ] [READONLY] ] [ ,...n ] [ WITH <procedure_option> [ ,...n ] ] [ FOR REPLICATION ] AS { [ BEGIN ] sql_statement [;] [ ...n ] [ END ] } [;]

Work example

A stored procedure needs a reviewed result, parameter, or error-handling change.

Find callers and grants, then compare output and transaction behavior on a restored copy.

Check your work All callers receive the intended columns and failure cases return the documented error behavior.

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