Use of Column Type in Declarations
Input and output parameters or local variables can also be declared using the data type of columns in existing tables and views.The TYPE OF COLUMN
clause is used for that, specifying relationname.columnname as its argument.
When TYPE OF COLUMN
is used, the parameter or variable inherits only the data type and — for string types — the character set and collation.The constraints and default value of the column are ignored.