Skip to main content
The ALTER PROCEDURE modifies a .

Required privileges

Refer to the respective subcommands.

Synopsis

alter_proc syntax diagram

Parameters

Subcommands

OWNER TO

ALTER PROCEDURE ... OWNER TO is used to change the owner of a procedure.

Required privileges

  • To alter the owner of a procedure, the new owner must have on the schema of the procedure.
  • To alter a procedure, a user must the procedure.
  • To alter a procedure, a user must have on the schema of the procedure.

Parameters

See Synopsis.

RENAME TO

ALTER PROCEDURE ... RENAME TO changes the name of a procedure.

Required privileges

  • To alter a procedure, a user must the procedure.
  • To alter a procedure, a user must have on the schema of the procedure.

Parameters

See Synopsis.

SET SCHEMA

ALTER PROCEDURE ... SET SCHEMA changes the of a procedure.
CockroachDB supports SET SCHEMA as an .

Required privileges

  • To change the schema of a procedure, a user must have on the new schema.
  • To alter a procedure, a user must the procedure.
  • To alter a procedure, a user must have on the schema of the procedure.

Parameters

See Synopsis.

Examples

Rename a stored procedure

The following statement renames the to delete_histories:

See also