write back to database
Hi everyone,
I try to write back quantity of data in MYSql, i need to pick out wrong data by checking if the input row has complied PK.
The way i am doing is using For loop and "select" statement and "result set" to process one inputed row at a time to see if PK not existing.
If there are easy way and fast way to process it and do exception control?
Thanks
[390 byte] By [
faceblinda] at [2007-11-27 10:25:31]

> http://forum.java.sun.com/thread.jspa?threadID=5194314
>
>
> Please only post your question once. Often your
> question will be ignored if posted multiple times
>
> Bamkin
Sorry for multiple posting ,since I don't know where is proper place.
> I dont understand your question. Please reword it and
> possibly provide code examples.
update table1, table2 set table1.col2 ='boy', table2.col3 = '2001-05-02'
where table1.sid ='199' and table2.sid ='199';
I only want to update raw data if sid, PK key, exists on both tables. I wonder if possible to get wrong sid from DB while updating...may be through exception control
I don't know if there are efficiency way here.