sp_recompile

Description

Causes each stored procedure and trigger that uses the named table to be recompiled the next time it runs.

Syntax

sp_recompile objname

Parameters

objname

is the name of a table in the current database.

Examples

Example 1

Recompiles each trigger and stored procedure that uses the table titles the next time the trigger or stored procedure is run:

sp_recompile titles

Usage

Permissions

Any user can execute sp_recompile.

See also

Commands create index, update statistics