You don't rollback queries, you only rollback updates to the database. And you can't selectively rollback updates, you can only rollback all updates since the last commit or rollback. It also doesn't make any difference whether those updates were done in a batch or not.
Thanks Paul. I meant updates to the database. As you said that changes could be rolled back since last commit, but Is there any possibility to rollback using addBatch()(normally used for catching the exception) for set of queries, just in case ?
I meant when queries are executed in batch and there is some error due to one particular query of the batch, is there any way so as to rollback the updates caused by faulty query? Just searching for a method to do this in case of large batch file.
I wish you would stop referring to updates as "queries". It's very distracting. Anyway, it's as I have already said twice now -- I will let you go back and read what I wrote. Or check the documentation if you like, but you'll see for yourself that the way rollback works is very simple. If you're hoping there are additional features not mentioned there, well, sorry, there aren't.