ALTER FUNCTION Statement

Modifies an existing function. Include the entire modified function in the ALTER FUNCTION statement.

Syntax

Syntax 1

ALTER FUNCTION [ owner.]function-name function-definition
function-definition CREATE FUNCTION syntax 

Syntax 2

ALTER FUNCTIONowner.]function-name
  SET HIDDEN 

Syntax 3

ALTER FUNCTIONowner.]function-name
  RECOMPILE 

Usage

Warning!   The SET HIDDEN setting is irreversible. If you need the original source again, you must maintain it outside the database.
Side effects:
  • Automatic commit

Standards

  • SQL—Vendor extension to ISO/ANSI SQL grammar.

Permissions

Alter a Watcom SQL or Transact-SQL function – Requires one of:
  • ALTER ANY PROCEDURE system privilege.
  • ALTER ANY OBJECT system privilege.
  • You own the function.
Alter an external C/C++ Scalar or Aggregate, or external Java function – Requires one of:
  • Requires CREATE EXTERNAL REFERENCE system privilege.
  • Also requires one of:
    • ALTER ANY PROCEDURE system privilege.
    • ALTER ANY OBJECT system privilege.
    • You own the function.
Related reference
ALTER PROCEDURE Statement
CREATE FUNCTION Statement
DROP Statement