SQL表连接的问题。。。急!!!
发布网友
发布时间:2022-04-10 00:07
我来回答
共3个回答
热心网友
时间:2022-04-10 01:37
你的题目叙述不清,A.a若是单个值你就可以用判断条件,否则,将你的条件加在Where中,中间用OR连接即可,即:
sql:select * from B
where (A.a = 0)
or (A.a != 0 and A.a = B.a )
or (A.a != 0,and A.b = 0 and A.a = B.a)
or (A.a != 0 and A.b != 0 and A.a = B.a and A.b = B.b )
or (A.a != 0 and A.b != 0 and A.c=0 and A.a = B.a and A.b = B.b)
or (A.a != 0 and A.b != 0 and A.c !=0 and A.a = B.a and A.b = B.b)
热心网友
时间:2022-04-10 02:55
select A.*,B.* from A,B
where A.a=B.b and A.a<>0
热心网友
时间:2022-04-10 04:29
多看些关于VFP之类的书籍
就ok了
题目是否 错了呢?