Hi,
I need to update couple of tables to convert the existing email address into lower case. Using SQL, it is very easy to do but the problem is that these tables are very huge and contains atleast 2M records. I am not sure which is the best way to do update:
1) Using SQL, something like this
update contact set email_address = lower(email_address);
2) Using SQL, but in certain number of records.
update contact set email_address = lower(email_address) where (contact _id >= 1 and contact_id <= 10000);
commit;
update contact set email_address = lower(email_address) where (contact _id >= 10001 and contact_id <= 20000);
commit;
..............so on
3) Using
Java JDBC ResultSet by updating one record at a time by scrolling ResultSet. Here the ResultSet may contain atleast 2M records and I will be reading one by one and updating record one by one.
Any suggestion which one is the best or any other alternative.
Thanks in advance.
SK