小菜级!! update tableb set b=(select a from tablea where .....) 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 update b set b=(select a from a where a=b)能看明白吧 DECLARE @name varchar(40)DECLARE cur cursor for select a from table where ...OPEN curFETCH NEXT FROM curINTO @namewhile @@fetch_status=0begin if @name=你要的条件 update table set ...... FETCH NEXT FROM curINTO @nameendCLOSE curDEALLOCATE curGO update b set b=a.afrom a,bwhere a.id=b.id sql-server里怎么执行批处理语句 SQL2000安装遇到的问题 有没有第三方的工具,可以找到那些需要优化的sql语句? 锁,并发,事务,事务隔离级别,脑子乱了。 问个不常问的 win7里面,读取并显示sql图片问题 将截断字符串或二进制数据,如何解决 sql server2005如何替换某一列的值 Update 随机值 请教这个约束怎么写? 关于将sql的表导成ACCESS 一个菜鸟问题,请问这个函数怎么用?
能看明白吧
DECLARE cur cursor for select a from table where ...
OPEN cur
FETCH NEXT FROM curINTO @name
while @@fetch_status=0
begin
if @name=你要的条件
update table set ......
FETCH NEXT FROM curINTO @name
end
CLOSE cur
DEALLOCATE cur
GO
from a,b
where a.id=b.id