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.
我想检查查询的每个连接部分是否返回了一些结果。
first table result set LEFT JOIN second table result set LEFT JOIN third table result set.
我正在考虑检查每组的第一列 - 是否为空,但不确定。
您可以检查每个左连接是否存在匹配的字段。如果没有匹配项,该字段将为 NULL。
例子
SELECT CASE WHEN `second table`.joinfield IS NULL THEN 'No Match' ELSE 'Match' END as is_match
等等