Take the 2-minute tour ×
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. It's 100% free, no registration required.

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

1 Answer 1

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 http://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.

share|improve this answer

Your Answer

 
discard

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.