求助一个sql联合查询
表A,列y_id,表B,列x_id,cond1,cond2,cond3想SELECT出,表A中的所有列,条件是1:表A.y_id=0或2:表A.y_id=表B.x_id(附加条件必须同时符合cond1=1 and cond2=2 and cond3=3 不知道我说的是否清楚。
其他答案
select *from Awhere y_id = 0 or exists(select * from B where A.y_id=B.x_id and cond1=1 and cond2=2 and cond3=3)
2010-10-27 09:02
来自北京市
赞(0)点赞赞(0)举报
免责声明:问答内容均来源于互联网用户,房天下对其内容不负责任,如有版权或其他问题可以联系房天下进行删除。




