Common Oracle statement records
Intersection/difference set/union select * from tb_a intersect minus union all select * from tb_ B condition branch decode () Example: if no search condition exists, check the landline. BY default, check the phone number. SELECT * from and decode (SEND_MOBILE, NULL, TELNUM, SEND_MOBILE) LIKE '2013'. The row number output row_number () OVER (order by null) or rownum pseudo-column aggregate output SELECT listparts (STUNAME, '+') within group (order by stunum) OVER (partition by classname) FROM STU_INFO simultaneous INSERT + UPDATE: if a data already exists in Table 1, UPDATE table 1; otherwise, insert merge into TBL1 T1 USING (SELECT 'd0001 'ID, 'King' name from dual) t2 ON (T1.ID = T2.ID) when matched then update set name = T2.NAME when not matched then insert values (T2.ID, T2.NAME) and the previous data output SELECT ''| STU_NAME, 'Next is '| LAG (STU_NAME, 1) ignore nulls over (order by stunum) FROM STUINFO