问题描述:
有两张表,A,B。
表A 的字段:id,topicNum,createDate
表B 的字段:id,pv,uv,type,createDate
查询要求:查询A表中的所有数据,在连接查询B表 以时间和B.type=1...为条件 A.createDate=B.createDate 
B表的Type有4个值,分别是:1,2,3,4在线等回复

解决方案 »

  1.   

    下个Navicat for MySQL视图左连接加条件 应该就出来了
      

  2.   

    转到MYSQL版块效果更好些。。
      

  3.   

    select A.* from A,B  where A.createDate=B.createDate and B.type=1
      

  4.   


    这个方法虽然可以查,但结果不对,有很多重复的数据 “where A.createDate=B.createDate and B.type=1
    ”我只希望对B表邮箱,而不是A表也有效。问题依然为解决,但还是结贴吧。