Subject RE: [firebird-support] Definig variable as a domain
Author Alan McDonald
>
> At 05:13 PM 15/03/2010, you wrote:
> >Thanx Helen. Can you clarify what is the difference between
> >
> >DECLARE VARIABLE RATE PERCENTAGE;
> >and
> >declare variable RATE TYPE OF PERCENTAGE;
>
> PERCENTAGE is not a data type. The TYPE OF keyword signals to the

this clarifies it...

Depending on your requirements, you can declare the argument or variable
using
. the domain identifier alone, in lieu of the native data type identifier,
to have the variable inherit all of the
attributes of the domain; or
. the data type of the domain, without inheriting CHECK constraints and
the DEFAULT value (if declared in
the domain), by including the TYPE OF keyword in the declaration (see the
syntax below)