access数据库删除问题,为什么删不掉?

姜陈子 2007-11-06 11:05:16
select * from online where datediff('s',lasttime,now())>600
能查询出记录
但delete from online where datediff('s',now(),lasttime)>600
却删不掉记录
...全文
310 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
姜陈子 2007-11-06
  • 打赏
  • 举报
回复
不好意思
我时间写反了
该成
delete from online where datediff( 's ',lasttime,now())> 600
就行了
XJY123 2007-11-06
  • 打赏
  • 举报
回复
delete from online where lasttime in (select lasttime datediff( 's ',now(),lasttime)> 600)
试试
Go 旅城通票 2007-11-06
  • 打赏
  • 举报
回复

--你前面的代码时间搞反了吧
--MSSQL
delete from online where datediff( 's',lasttime,getdate())> 600






--access
delete from online where datediff('s',lasttime,date())> 600

28,390

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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