Firebird Documentation IndexFirebird 2.0 Language Ref. UpdateDDL statements → CREATE DOMAIN
Firebird Home Firebird Home Prev: CREATE DATABASEFirebird Documentation IndexUp: DDL statementsNext: CREATE EXCEPTION

CREATE DOMAIN

Table of Contents

Context variables as defaults

Tip

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

Available in: DSQL, ESQL

Context variables as defaults

Changed in: IB

Description: Any context variable that is assignment-compatible to the new 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: 

create domain DDate as
  date
  default current_date
  not null
Prev: CREATE DATABASEFirebird Documentation IndexUp: DDL statementsNext: CREATE EXCEPTION
Firebird Documentation IndexFirebird 2.0 Language Ref. UpdateDDL statements → CREATE DOMAIN