Recently, the process was quite busy, day and night, and I had no time to write a blog. Today, a very strange problem, especially a tough problem, has struggled for a long time and I have to write a blog.
Select * From wlbtest3where (sname, SAGE) not in (select user_name, user_age from wlbtest4) Select * From wlbtest3where (sname | SAGE) not in (select user_name | user_age from wlbtest4)
Do you think the above two statements have the same effect?
You think that is the same and you are wrong !!! I thought it was the same at first. This is used at work, but the data is always not logical.
Finally let me find this place:
Select * From wlbtest3where (sname, SAGE) not in (select user_name, ''from wlbtest4)
What does the above sentence mean? You don't have to guess !!!
It means matching sname, but not matching sage, and the effect is the same as that below.
Select * From wlbtest3where (sname) not in (select user_name from wlbtest4)
So when the value of user_age is null, unexpected problems will occur... We recommend that you use "|.