求助!SQL查询语句。

hsx49949046 2008-12-10 08:59:20
我想查询数据库里时间为2008-8-8至2008-12-1之间的所有数据。应该怎么写?
...全文
49 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
bw555 2008-12-10
  • 打赏
  • 举报
回复
select * from table where time>='2008-08-08' and time <'2008-12-02'
tanghuiming 2008-12-10
  • 打赏
  • 举报
回复
select * from table where time>'2008-08-08' and time<'2008-12-01'
lizhengnan 2008-12-10
  • 打赏
  • 举报
回复

select * from table
where datecol>='2008-8-8'
and datecol<='2008-12-1'


最好加上时间.

select * from table
where datecol>='2008-8-8 0:00:00'
and datecol<='2008-12-1 23:59:59'
lizhengnan 2008-12-10
  • 打赏
  • 举报
回复

select * from table
where datecol>='2008-8-8'
and datecol>='2008-12-1'

16,554

社区成员

发帖
与我相关
我的任务
社区描述
VB技术相关讨论,主要为经典vb,即VB6.0
社区管理员
  • VB.NET
  • 水哥阿乐
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧