Y
ydzi_
Unregistered / Unconfirmed
GUEST, unregistred user!
D表
DID DMemo
D1 ...
D2 ...
D3 ...
C表
CID BInfo C1 C2 C3 DID
C1 ... 1 2 3
C2 ... 4 5 6
V表
VID VNum VInfo1 VInfo2 EID
V1 1 ...
V2 4 ...
E表
EID EName
E1 ...
E2 ...
SELECT A.AMemo AS AMemmo, C.CInfo1 AS 'CInfo1', C.CInfo2 AS 'CInfo2',E.EName AS EName FROM A,B,C,D,E,V
WHERE B.AID = A.AID AND ((V.VNum = C.C1) OR (V.VNum = C.C2) OR (V.VNum = C.C3)) AND E.EID = V.EID
问题:
C表中有这个号码,那么这条记录才可能查出来!
现在如果我要查的这条记录在C表中不存在,那应该怎么做啊!谢谢
DID DMemo
D1 ...
D2 ...
D3 ...
C表
CID BInfo C1 C2 C3 DID
C1 ... 1 2 3
C2 ... 4 5 6
V表
VID VNum VInfo1 VInfo2 EID
V1 1 ...
V2 4 ...
E表
EID EName
E1 ...
E2 ...
SELECT A.AMemo AS AMemmo, C.CInfo1 AS 'CInfo1', C.CInfo2 AS 'CInfo2',E.EName AS EName FROM A,B,C,D,E,V
WHERE B.AID = A.AID AND ((V.VNum = C.C1) OR (V.VNum = C.C2) OR (V.VNum = C.C3)) AND E.EID = V.EID
问题:
C表中有这个号码,那么这条记录才可能查出来!
现在如果我要查的这条记录在C表中不存在,那应该怎么做啊!谢谢