select count(*) from 表1,表2 where 表1.字段2/ 表2.字段4 and 表1.字段1= 表2.字段3

解决方案 »

  1.   

    --这个意思?select count(*) from 表2 b
    where exists(select * from 表1 where 字段1=b.字段3 and a.字段4*1./字段2>1.5)
      

  2.   

    select count(*) 字段,数目
    from 表1,表2 
    where 表1.字段1=表2.字段3 and 表2.字段4/表1.字段2>1.5;
      

  3.   

    楼上的这为前辈,您上面的 字母 "a","b"是说的表1和表2吗?还有"a.字段4*1./"中的"1."是什么意思,谢谢了
      

  4.   

    select count(*) 字段,数目
    from 表1,表2 
    where 表1.字段1=表2.字段3 and 表2.字段4/表1.字段2>1.5;
    可以是吗?谢谢
    select count(*) as n
    from 表1,表2 
    where 表1.字段1=表2.字段3 and 表2.字段4/表1.字段2>1.5;