Declares new names for existing datatypes.
typedef existingdatatypeName newdatatypeName;
existingdatatypeName | The original datatype. |
newdatatypeName | The new name for the datatype. |
Typedefs allow giving new names for existing datatypes, which can be used to define new variables and parameters, and specify the return type of functions. Typedefs can be declare in declare blocks, UDFs and inside FLEX procedures. The types declared in typedefs must resolve to simple types.
typedef money(2) euros;Once you have defined the euro typedef, you can use:
euros price := 10.80d2;which is the same as:
money(2) price := 10.80d2;