is there a way to add the results of 2 different queries to a resultset?
something like that:
ResultSet rs ; i=0; while(i<=l) ResultSet rs1 = select * from tablei; rs = rs + rs1; i++; }
I know that I can do it with union, but I have a lot queries and if I use UNION the query is too slow.
Any idea?
Are you doing a UNION or a UNION ALL? The latter shouldn’t be much different from doing it yourself (although I’d expect doing it yourself to be slower).