Tutorial by Examples

Normal Update UPDATE TESTTABLE SET TEST_COLUMN= 'Testvalue',TEST_COLUMN2= 123 WHERE EXISTS (SELECT MASTERTABLE.TESTTABLE_ID FROM MASTERTABLE WHERE ID_NUMBER=11);
Using Inline View (If it is considered updateable by Oracle) Note: If you face a non key preserved row error add an index to resolve the same to make it update-able UPDATE (SELECT TESTTABLE.TEST_COLUMN AS OLD, 'Testvalue' AS NEW FROM TESTTA...
Using Merge MERGE INTO TESTTABLE USING (SELECT T1.ROWID AS RID, T2.TESTTABLE_ID FROM TESTTABLE T1 INNER JOIN MASTERTABLE T2 ON TESTTABLE.TESTTABLE_ID = MASTERTABLE.TESTTABLE_ID WHERE...
drop table table01; drop table table02; create table table01 ( code int, name varchar(50), old int ); create table table02 ( code int, name varchar(50), old int ); truncate table table01; insert into table01 values (1, 'A', 10); insert in...

Page 1 of 1