MySQL - EXISTS 和 NOT EXISTS
语法规则:
SELECT * FROM tableName t WHERE 1 = 1 AND 2 = 2 AND EXISTS (SELECT * FROM tableName t2 WHERE t.id = t2.proj_id)
SELECT * FROM tableName t WHERE 1 = 1 AND 2 = 2 AND NOT EXISTS (SELECT * FROM tableName t2 WHERE t.id = t2.proj_id)