SQL where条件

时间:2011-03-04 18:22:09

标签: mysql sql

如何使用时间间隔

在日期字段上构建过滤器
Where Data is in ]date1, date2] and [date3, date4[

1 个答案:

答案 0 :(得分:3)

SELECT "column_name"
FROM "table_name"
WHERE "column_name" BETWEEN 'value1' AND 'value2'

有效日期:

 where date between '2005-01-01' and '2005-01-31'