Home > database >  PLSQL remove columns in the same line
PLSQL remove columns in the same line

Time:10-08

Id like id2 value, want to remove these two lines of statistical time, how to write SQL statements can't imagine the

CodePudding user response:

Result set to 2

CodePudding 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 be
Select * 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),
  • Related