Select * from [表名] where time between 2012-12-01 00:00:00 and 2012-12-07 23:59:59 因为时间在数据库中保存一般都是固定格式 例如DATE TIME类型,所以可以用between..and..函数 也可以用“>”,"<"号来表示,例如 datetime>2012-12-01 00:00:00 and datetime<2012-12-07 23:59:59
热心网友时间:2024-07-12 22:50
Select * from table where time between time1 and time2