--不知道是不是
select a.id,a.c,a.d,a.e,a.f,b.g from a a join b b on a.id=b.id and b.g>10

解决方案 »

  1.   

    select b.* from a表 as a,b表 as b where a.id=b.id and b.g>10
      

  2.   

    select * 
    from a
    cross join  b
    where b.g>10
      

  3.   


    id ,c,d,e,f这几个字段你要从哪个表里面取,还是这两个表的冗余
    如果是冗余

    SELECT A.ID,B.ID,A.C,A.D,A.E,A.F,B.G
    FROM A INNER JOIN B ON A.C=B.C AND A.D=B.D AND A.E=B.E AND A.F=B.F
    WHERE B.G>10
      

  4.   

    select * from a inner join b on a.id=b.id where b.g>10
      

  5.   

    还是?
    select b.*
    from a
    inner join  b
    on a.id=b.id
    where b.g>10
      

  6.   

    a表 和 b表的关联关系是什么?都有c、d、e、f字段,是要查询输出哪个表的这些字段?
      

  7.   

    select a.id,a.c,a.d,a.e,a.f,b.g from a a,b b where a.id=b.id and b.g>10
      

  8.   

    emp_1表:有id,c,d,e,f
    emp_2表:有id,c,d,e,f,g从emp_1,emp_2表中查询出有id ,c,d,e,f,g的字段并且g>10