select * from yourtable where a >1 and a < 6
统计什么?是个数么?
select sum(1) from yourtable where a >1 and a < 6

解决方案 »

  1.   

    select * from yourtable where a >1 and a < 6select sum(字段名) from yourtable where a >1 and a < 6
      

  2.   

    select id from (select id,count(id) as nn from table where id>1 and id<6 group by id) where nn>=3
      

  3.   

    你的表述还是不清楚
    1。如果在表中有id>1 and id<6 出现3次以上的,楼上的可以解决你的问题。
    2。如果是这样,3,4,5 可以 但是 2,3,5 就不符合条件.这样的sql没有
      

  4.   

    但是我用的是access数据库啊,没有别的办法了么
      

  5.   

    在1<=x<=6的情况下,如果是457可不可以呢?235可不可以呢?