📅  最后修改于: 2022-03-11 15:05:20.754000             🧑  作者: Mango
SELECT A.name,
CASE WHEN B.name IS NOT NULL
THEN 'common'
ELSE 'not common'
END
FROM table1 A
LEFT JOIN table2 B
ON A.name = B.name