SQL update语句只更新第一条记录怎么写?
答案:4 悬赏:0
解决时间 2021-03-06 19:03
- 提问者网友:龅牙恐龙妹
- 2021-03-06 07:13
SQL update语句只更新第一条记录怎么写?
最佳答案
- 二级知识专家网友:逐風
- 2021-03-06 08:43
updateA set W=9 where Q=1 and W=(select top 1 W from A where Q=1)
全部回答
- 1楼网友:酒者煙囻
- 2021-03-06 12:00
在sqlserver中 set rowcount 1 update... 其他数据库就不知道了
- 2楼网友:一秋
- 2021-03-06 10:26
update A set W=9 where Q=1 and W=2
- 3楼网友:一袍清酒付
- 2021-03-06 09:42
update A setW=9 where id=(select top 1 id from A where q=1)
我要举报
如以上问答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯