Oracle SQL not in Multi-field comparison example, oraclesql
Select * from (select t2.cadastralno parcelid, t1.pkid taxpayerid, t2.taxtype taxtype, t1.booktype taxpayertype,
T2.cadastralno parcelCadastralno, t2.landuser parcelLanduser, t1.payername taxpayername
From grid_sysdb.bss_taxpayers t1, grid_sysdb.bbs_parcel t2, grid_sysdb.djsw_tddjxx t3
Where t3.nsdzdah = t1.pkid and t1.payername = t2.landuser)
Where (parcelid, taxpayerid) not in (select p. parcelid, p. taxpayerid from bss_parceltaxpayerrel p)
Not in multiple fields
What is the role of not in Oracle SQL statements?
A not in (, 3) means not equal to all values of, 3 (values listed in parentheses). where a not in (, 3) can use where! = 1 and! = 2 and! = 3 instead, the execution results are identical.
How to Use PL/SQL to compare the data of two oracle tables and create an oracle view result set
Example: merge into test1 t1
Using test2 t2
On (t1.id = t2.id)
When matched then
Update set t1.name = t2.name
When not matched then
Insert values (t2.id, t2.name)
-- This is equivalent to condition judgment. The meaning of this example includes update and insert. Therefore, it can be understood as the same as directly replacing the file after Pasting and copying.