select * from * where n > 0 and n < 100

解决方案 »

  1.   

    str.format("select * from  xxx where xx <%d and xx >%d",100,0);
      

  2.   

    CString strSQL;
    int nMin = 0;
    int nMax = 60;strSQL.Format( "SELECT * FROM student WHERE score > %d AND score < %d" , nMin, nMax );
      

  3.   

    select * from * where n>0 and n<100
      

  4.   

    用COUNT可以获得一共有多少条数据
      

  5.   

    这个是基本的查询,楼主应该学习SQL基本用法
      

  6.   

    可以用count获得,也可以自定义一个变量,用while()循环来做,但这样做的代码质量好差
      

  7.   

    CString str; 
     str.Format("select * from table where n>%d and n<%d",nMin,nMax);   
       db.ExecuteSQL(str);