Dynamically determine the type of a variable in stored procedures in DB2
Is it possible to dynamically determine the type of a variable in a stored procedure with a column type in the table.
I want to set a type myVar
like mytable.mycolumn
DECLARE at_end SMALLINT DEFAULT 0;
DECLARE myVar VARCHAR(21); -- It should be the type of mytable.mycolumn
In Oracle, this is possible with age_of_person mytable.mycolumn%TYPE;
How does it work in DB2 9.7 ??
+3
source to share