Oracle SQL not in Multi-field comparison example, oraclesql

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.