Win a copy of Classic Computer Science Problems in Swift this week in the iOS forum!

hemant mandge

+ Follow
since Jul 04, 2012
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by hemant mandge

Thanks Wendy,

Following two methods for updating Tables with example.

Which one of Following TWO METHODS will have good performance.

METHOD ONE:- [updatable resultset]
following is piece of code using updatable resultset

METHOD TWO:- [ update statement ]
for having Series of update statement i need to have same piece of code with createStatement in READ_ONLY Mode.
It will fetch each record one by one and execute update query for SSN

I want to know how the performance of updatable ResultSets compare to a regular update/delete statements?

More Details:

I’ve a table which could have several thousands of rows. I need to update value from one of the column for each row with new value. e.g Encrypt Social Security Number for every customer and update it in table.

So, I’ve to do a SELECT statement, loop through the ResultSet and update record.

Now the question is, should I use an updatable result set when doing my SELECT statement or would it perform better if I get a READ-ONLY result set and fire a UPDATE statement (with the primary key) for every row that I want to UPDATE.

Need Help Urgently.