以下是我的案例:
尝试在一个查询中获取所有记录,如:
Select name (B.name or C.name), final(B.status or C.result), type
from A,B,C with case type==B ? A.KeyID == B.KeyID : A.KeyID == C.KeyID
我正在使用Sqlite。
答案 0 :(得分:-1)
我对Sqlite并不熟悉,但这样的事情应该可行,因为我没有看到表A的重点
SELECT name as Name, status as Other
FROM B
UNION
SELECT name as Name, result as Other
FROM C