I am trying to pass a collection of Employee objects from Java code to a DB2 Stored Procedure. In SQL server I can do that by making use of Table-Valued Parameters. In DB2 how can I achieve this?
Asked
Active
Viewed 672 times
1 Answers
3
Refer to Invoking stored procedures with ARRAY of ROW parameters in JDBC applications.
Or use Declared Global Temporary Table creating it and inserting rows into it beforehand and use this DGTT in your SP as ordinary table.

Mark Barinstein
- 11,456
- 2
- 8
- 16
-
Thank you for the response, I was about to consider an alternative of passing Json from java and parsing the same in DB2 using Json_Table function.. – Pavan Kathi Jun 06 '20 at 10:04
-
1Sure, the same is possible passing clob/xml as parameter and using `xmltable` function inside. – Mark Barinstein Jun 06 '20 at 13:59