meta data for this page
  •  

ALTER PROCEDURE

Available in: DSQL, ESQL

Default argument values

Added in: 2.0

Description

You can now provide default values for stored procedure arguments, allowing the caller to omit one or more items from the end of the argument list.

Syntax

ALTER PROCEDURE procname (<inparam> [, <inparam> ...])
   ...

<inparam> ::= paramname datatype [{= | DEFAULT} value]

Important: If you give a parameter a default value, all Stored procedure parameters (input and output/returns)|parameters coming after it must also get default values.

Example

alter procedure TestProc
   (a int, b int default 1007, s varchar(12) = '-')
   ...

Restriction on altering used procedures

Changed in: 2.0, 2.0.1

Description

In Firebird 2.0 only, a restriction is in place which prevents anyone from dropping, altering or recreating a trigger or stored procedure if it has been used since the database was opened. This restriction has been removed again in version 2.0.1. Still, performing these operations on a live database is potentially risky and should only be done with the utmost care.