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.
基本上我有一个帐户 ID 列表,这些帐户 ID 链接到存储在 mysql 中的游戏中的角色,我想做的是进行查询,如果帐户 ID 不在此列表中,则将其删除
如果要删除不再有用户的字符,可以使用:
DELETE characters FROM characters LEFT JOIN users USING (user_id) WHERE users.user_id IS NULL