CodePudding user response:
Result set to 2CodePudding user response:
Selct * From A Where clause NOTE_ID not in (Select NOTE_ID2 From A)Remove all ID2 values in the table, and then take ID is not equal to ID2 data in the table, I do not know whether you want the results,
CodePudding user response:
Didn't look at the building description, it didn't write complete, should beSelect * from A where clause NOTE_ID not in
(
The select NOTE_ID From A Where clause NOTE_ID in (select distinct NOTE_ID2 From A)
The UNION
The select NOTE_ID From A Where clause NOTE_ID2 in (select distinct NOTE_ID From A)
)
Put the table in all ID ID value in the ID2 and ID2 ID value all out, not in the ID again above in the table to take ID not in the result set data in a repeated (ID),