alter function

Description

Adds parameters to a user-defined function.

Syntax

alter function table_rep_def.function_name
	add parameters @param_name datatype
	[, @param_name datatype]...

Parameters

table_rep_def

The name of the replication definition upon which the user-defined function operates.

function_name

The name of the user-defined function to be altered.

@param_name

The name of a parameter to be added to the user-defined function’s parameter list. The parameter name must conform to the rules for identifiers and must be preceded by an @ sign.

datatype

The datatype of the parameter. See “Datatypes” for a list of the datatypes and their syntax. The parameter cannot be text, unitext, raw object, or image.

Examples

Example 1

alter function publishers_rep.upd_publishers
 add parameters @state char(2)

Adds an integer parameter named state to the upd_publishers function for the publishers_rep replication definition.

Usage

Permissions

alter function requires “create object” permission.

See also

admin quiesce_check, alter function string, create function, create function string, drop function, drop function string