Is there a way to catch more than one SELECT sentence in the same resultset? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

Is there a way to catch more than one SELECT sentence in the same resultset?

Hello, I'm learning about triggers a stored procedures in MySQL and I tried to do a stored procedure that run more than one query. Is it possible to handle them that way in java?

4th Jun 2020, 5:45 AM
JSolorzano
JSolorzano - avatar
1 Answer
+ 1
If the queries are related to each other, you can either use sub queries or JOIN your tables, perhaps UNION in some cases. If you wanna handle the queries in Java, it really depends on what you wanna do with them... Either handle this them sequentially or run them in different threads for them to run in parallel to each other which is a bit harder to handle
27th Jun 2020, 10:38 AM
Dominique Abou Samah
Dominique Abou Samah - avatar