update top 1 set 字段1=··· where 条件···符合条件的有很多 但是我只想更该第一个~~上面代码无法运行
update tb set name='...' from tb where id=(select top 1 id from tb order by id asc )参考吧
--如果没有特殊要求,更新随便哪一条都行的话,那就执行set rowcount 1 update tb set name='...' where ...... set rowcount 0--如果要根据某写字段排序,那就用update set name='...' from tb where id=(select top 1 id from tb where ... order by...)
如果一次更新两个表 update tb,tb set ss=```` where `````` 怎么无法执行
set 字段1=···
where 条件···符合条件的有很多
但是我只想更该第一个~~上面代码无法运行
update tb
set name='...'
from tb
where id=(select top 1 id from tb order by id asc )参考吧
--如果没有特殊要求,更新随便哪一条都行的话,那就执行set rowcount 1
update tb set name='...'
where ......
set rowcount 0--如果要根据某写字段排序,那就用update set name='...' from tb
where id=(select top 1 id from tb where ... order by...)
update tb,tb
set ss=````
where ``````
怎么无法执行