如何在SQL中按时间段查询数据
如何在SQL中按时间段查询数据
日期:2019-10-22 14:27:14 人气:1
sql server:
select * from 表 where 发生日期>'2008-7-1' and 发生日期<'2008-12-31'
access:
select * from 表 where 发生日期>#2008-7-1# and 发生日期<#2008-12-31#
这样就可以了,注意sql server与access中的日期有一点不一样。
扩展资料:sql查询日期语句
select * from ShopOrder where dat