Firebird Documentation IndexFirebird 1.5 Language Ref. UpdateDDL statements → ALTER DOMAIN
Firebird Home Firebird Home Prev: DDL statementsFirebird Documentation IndexUp: DDL statementsNext: ALTER TABLE

ALTER DOMAIN

Table of Contents

Rename domain
SET DEFAULT to any context variable

Tip

Find a more recent version at Firebird 5.0 Language Reference: DOMAIN

Available in: DSQL, ESQL

Rename domain

Added in: IB

Description: Renaming of a domain is possible with the TO clause. This feature was introduced in InterBase 6, but left out of the Language Reference.

Example: 

alter domain posint to plusint
  • The TO clause can be combined with other clauses and need not come first in that case.

SET DEFAULT to any context variable

Changed in: IB

Description: Any context variable that is assignment-compatible to the domain's datatype can be used as a default. This was already the case in InterBase 6, but the Language Reference only mentioned USER.

Example: 

alter domain DDate
  set default current_date
Prev: DDL statementsFirebird Documentation IndexUp: DDL statementsNext: ALTER TABLE
Firebird Documentation IndexFirebird 1.5 Language Ref. UpdateDDL statements → ALTER DOMAIN