Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Can I write a Select query under a jdbc connection ,having a resultset object and which would update the records on just passing the select query them in my sql.

share|improve this question
Just to clarify: Do you want any change to the "resultset object" to be written back to the database automatically? Or are you looking for a SQL UPDATE statement that also returns a resultset of the changed rows? – Sebastian Meine Oct 3 '13 at 18:03
you are right. I want change to the "resultset object" to be written back to the database automatically – Ritzz081 Oct 4 '13 at 7:35
up vote 0 down vote accepted

This is not possible, at least not with plain JDBC.

But, an ORM might give you what you are looking for. However, the use of ORMs is controversial. Have a look at for an interesting collection of opinions. You can find a few example ORMs in there too.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.