请教关于Access 的SQL语句问题

yoyo19820622 2011-09-18 12:17:17
update ans a set
mark=(select max(b.mark) as mark from score b
where b.id=1 and b.code0=2
and b.code1=0 and a.ord=b.ord and a.ans=b.ans
)
where no= 1

在Oracle可以执行,在Access 怎么执行不了呢
...全文
41 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
WWWWA 2011-09-19
  • 打赏
  • 举报
回复

update ans a set
mark=dmax("mark","score","id=1 and code0=2 and code1=0 and ord=" & a.ord & "and ans=" & a.ans)
where [no]= 1
假设ord、ans为数字型
dawugui 2011-09-18
  • 打赏
  • 举报
回复
update ans set
mark=(select max(b.mark) as mark from score b
where b.id=1 and b.code0=2
and b.code1=0 and a.ord=b.ord and a.ans=b.ans
)
from ans a
where no= 1

7,714

社区成员

发帖
与我相关
我的任务
社区描述
Microsoft Office Access是由微软发布的关系数据库管理系统。它结合了 MicrosoftJet Database Engine 和 图形用户界面两项特点。
社区管理员
  • Access
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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