一个表中存在但另外一个表中不存在的SQL,两种写法:
NOT EXISTS
SELECT ip
FROM login_log l
WHERE NOT EXISTS (
SELECT 1 -- it is mostly irrelevant what you put here
FROM ip_location i
WHERE l.ip = i.ip
);
<!-- Baidu Button BEGIN -->
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/26687597/viewspace-1207609/
,如需转载,请注明出处,否则将追究法律责任。