------解决方案-------------------- SELECT A.*
FROM TAB A
WHERE 列三 <> ''
OR EXISTS (
SELECT 1
FROM TAB B
WHERE B.列三 = A.列一
)
------解决方案--------------------
正解!!! ------解决方案-------------------- 我觉得应该是
SELECT * FROM t_TEST_A WHERE c1 IN (SELECT C3 FROM t_TEST_A)
union
(
SELECT * FROM t_TEST_A WHERE c3 IN (SELECT C1 FROM t_TEST_A)
)
用楼上的语句会丢失第一条