我们要查询a表中没有b的数据
SELECT
a.*
FROM
table_a
a
WHERE
NOT EXISTS (
SELECT
b.id
FROM
table_b
b
WHERE
a.id
= b.id
)
我们要查询a表中没有b的数据
SELECT
a.*
FROM
table_a
a
WHERE
NOT EXISTS (
SELECT
b.id
FROM
table_b
b
WHERE
a.id
= b.id
)