Unanswered: Equivalent of Oracle's %ROWTYPE in DB2
I am presently converting a Oracle database to DB2. I have converted almost everything and wrote a Java program for converting %TYPE format too.
Now My problem is that I am confused about TABLENAME%ROWTYPE. As its very hard for me to find the DB2 equivalent for the same. For me the most suitable replacement would be defining a cursor for the same.
Variable9 datatype9 := value9;
SELECT * INTO rowtype1 FROM table1
WHERE c = xxxx;
SQL PL (DB2)
DECLARE variablea datatype1;
DECLARE variableb datatype2;
DECLARE variablec datatype3;
DECLARE variable9 datatype9
SELECT a, b, c INTO variablea, variableb,
FROM table1 WHERE c = xxxx;
Visit the new-look IDUG Website , register to gain access to the excellent content.