Doing 3 queries in three methods.


I have 3 queries
   1. is to get values of some items
   2. See if one of the  value in the table is set to "true"
   3. Update the flag to "false"

Query 1 can not go through until query 2 is successful and the value in table is set to "true"

Now using Resultset and Connection how do I do this in three methods or even in the same method. I dont want to duplicate the
Connection conn==........    code.

Thank you in advance for all the help
Who is Participating?
Mayank SAssociate Director - Product EngineeringCommented:
Look at the JDBC tutorial for a start:
Manikandan ThiagarajanSenior consultantCommented:
use sub query
Mayank SAssociate Director - Product EngineeringCommented:
Why can't you do

update x set y = true where y = false

atwork2003Author Commented:
Thank you guys for all the help:)
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.