SQL语句错误的原因?

dgarden 2005-10-10 05:39:37
delete
FROM dbo.News t
where exists(select * from dbo.User u where u.UserID = t.PostUserid
and (DATEDIFF(hh, u.JoinDate, GETDATE()) < 24) )

服务器: 消息 170,级别 15,状态 1,行 2
第 2 行: 't' 附近有语法错误。
服务器: 消息 156,级别 15,状态 1,行 3
在关键字 'User' 附近有语法错误。
...全文
110 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
Well 2005-10-10
  • 打赏
  • 举报
回复
delete
FROM News t
where exists(select * from User u where u.UserID = t.PostUserid
and (DATEDIFF(hh, u.JoinDate, GETDATE()) < 24) )
jxdjxd1111 2005-10-10
  • 打赏
  • 举报
回复
delete
FROM News t
where exists(select * from User u where u.UserID = t.PostUserid
and (DATEDIFF(hh, u.JoinDate, GETDATE()) < 24) )

34,590

社区成员

发帖
与我相关
我的任务
社区描述
MS-SQL Server相关内容讨论专区
社区管理员
  • 基础类社区
  • 二月十六
  • 卖水果的net
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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