The best answer depends on what the relationship between the tables is. Do the rows in the tables contain 1:1 mappings? Is there a foreign key relationship that one table has with another?
The reason that this is important is because it critically determines how you go to the next step, which is to combine (or JOIN) the tables together. Once the tables are joined, you can easily export the data you want from the ResultSet.
For example, if tabB contains items ordered for the orders that are contained in the rows of tabA, then your tabB most likely has a foreign key many-to-one relationship with tabA, and can be joined together like this.
SELECT a.* b.*
FROM tabA AS a
JOIN tabB AS b ON a.primary_key = b.foreign_key
This assumes that your tables are well-formed and have a well defined relationship that you can use to join them together in a way that makes sense.