I can do this in MSSQL:
declare @id1 int
declare @id2 int
select @id1 = id1 , @id2 = id2 FROM dbo.table_id
In db2 this construction does't work and not work this
declare id1 int
declare id2 int
set id1,id2 = (SELECT id1, id2 FROM dbo.table_id)
I see only 2 solutions
How to do it more conveniently?
Db2 for inux/Unix/Windows allows this in inline SQL PL or stored-procedures:
declare id1 integer;
declare id2 integer;
set (id1, id2 ) = (select id1,id2 from dbo.table_id );