[HD-OCP17/21-Fundamentals Pg 770, Sec. 25.1.5 - retrieving-multiple-resultsets]

Help and support on OCA OCP Java Programmer Certification Questions
1Z0-808, 1Z0-809, 1Z0-815, 1Z0-816, 1Z0-817

Moderator: admin

Post Reply
raphaelzintec
Posts: 167
Joined: Sun Apr 21, 2024 10:43 am
Contact:

[HD-OCP17/21-Fundamentals Pg 770, Sec. 25.1.5 - retrieving-multiple-resultsets]

Post by raphaelzintec »

not explaining in which case you needa use it

" it is possible for a query to return multiple result sets."
how is it possible? no explanation here

if author doesnt find the need to explain something then he can just erase it from the book instead of giving vague explanations, a book is not made to push the reader to search always on google

admin
Site Admin
Posts: 10345
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: [HD-OCP17/21-Fundamentals Pg 770, Sec. 25.1.5 - retrieving-multiple-resultsets]

Post by admin »

Yes, you are right but in this case it is explained with code. If you were expecting something else, do let us know.
test.png
test.png (56.69 KiB) Viewed 8360 times

admin
Site Admin
Posts: 10345
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: [HD-OCP17/21-Fundamentals Pg 770, Sec. 25.1.5 - retrieving-multiple-resultsets]

Post by admin »

Oh did you mean how to write a query that returns multiple result sets? That's in SQL territory not in Java. Writing SQLs is not the focus of the book. You will not be required to write any query for the exam. You will only be required to know how to use JDBC API to fire them and get result(s).

raphaelzintec
Posts: 167
Joined: Sun Apr 21, 2024 10:43 am
Contact:

Re: [HD-OCP17/21-Fundamentals Pg 770, Sec. 25.1.5 - retrieving-multiple-resultsets]

Post by raphaelzintec »

thanks for the last tip

by far i understood that this getMoreResults() is used when you make a query of two tables

polytrack
Posts: 1
Joined: Tue Mar 25, 2025 8:44 pm
Contact:

Re: [HD-OCP17/21-Fundamentals Pg 770, Sec. 25.1.5 - retrieving-multiple-resultsets]

Post by polytrack »

raphaelzintec wrote:
Sun Oct 06, 2024 4:50 pm
not explaining in which case you needa use it

" it is possible for a query to return multiple result sets." Poly Track
how is it possible? no explanation here

if author doesnt find the need to explain something then he can just erase it from the book instead of giving vague explanations, a book is not made to push the reader to search always on google
The UNION ALL statement in SQL is used to combine the results of two or more SELECT statements into a single result set. Although the final result is a set, it is made up of the results of many individual queries.

admin
Site Admin
Posts: 10345
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: [HD-OCP17/21-Fundamentals Pg 770, Sec. 25.1.5 - retrieving-multiple-resultsets]

Post by admin »

No, that is not what getMoreResults is for. UNION/UNION ALL returns single result set. Multiple result sets can be returned from stored procedure. You may google it for more details but it is not on the exam.

Post Reply

Who is online

Users browsing this forum: liigapaljuinfot and 72 guests