设两个日期为Date1,Date2,并且Date1<Date2  select * from 表 where 字段 between Date1 and Date2

解决方案 »

  1.   

    select * from table1,table2 where table1.num between table2.num1 and table2.num2
      

  2.   

    查找条件为: a的值在b和c之间.
    select ...... where a between b and c;
      

  3.   

    Determines whether a value falls inside a range.value1 [NOT] BETWEEN value2 AND value3DescriptionUse the BETWEEN comparison predicate to compare a value to a value range. If the value is greater than or equal to the low end of the range and less than or equal to the high end of the range, BETWEEN returns a TRUE value. If the value is less than the low end value or greater than the high end value, BETWEEN returns a FALSE value. For example, the expression below returns a FALSE value because 10 is not between 1 and 5.10 BETWEEN 1 AND 5Use NOT to return the converse of a BETWEEN comparison. For example, the expression below returns a TRUE value.10 NOT BETWEEN 1 AND 5BETWEEN can be used with all non-BLOB data types, but all values compared must be of the same or a compatible data type. If one value is of an incompatible data type, convert that value with the CAST function to a compatible data type. Values used in a BETWEEN comparison may be column, literal, or calculated values.SELECT Saledate
    FROM Orders
    WHERE (Saledate BETWEEN "1/1/1988" AND "12/31/1988")
      

  4.   

    select * from a where a.field1 between 1 and 10
    检索出 field在1-10之间的所有数据