Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Help me double check this query. Please?
Hi,
I have a query which is updating one field in a record, if two fields in that record match 2 fields in a record of another table.
Basically:
update table1 t1 set column_a = 1
where T1.rec_id in (select rec_id from table2 t2
where t1.rec_id = t2.rec_id ) and t1.rec_date in (select rec_date from table2 t2 where t1.rec_Date = t2.rec_Date)
Does this do what I expect it to? Is there a cleaner way to accomplish this?
Any help would be appreciated.
-greg
![]() |
![]() |