0

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.

2
  • 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? Commented Oct 3, 2013 at 18:03
  • you are right. I want change to the "resultset object" to be written back to the database automatically
    – Ritzz081
    Commented Oct 4, 2013 at 7:35

1 Answer 1

0

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 https://stackoverflow.com/questions/452385/what-java-orm-do-you-prefer-and-why for an interesting collection of opinions. You can find a few example ORMs in there too.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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