Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有两个名称为“network”和“user”的表,它们都有一个名为 userid 的公共列,我想要的是从“user”中选择不在“network”的 userid 列中的 userid 值。它是一个 MYSQL 表,
使用此查询:
select userid from user where userid NOT IN (select userid from network);
SELECT a.userID FROM user a LEFT JOIN network b ON a.userid = b.userid WHERE b.userid IS NULL