两表关联update

1 --update [表1] set 字段=value from 表1,表2
2 
3 update  a set a.sortnum = b.t 
4 from UA_detail_ua as a ,(
5 select Row_number() over(order by model ascas t,id,model as c
6  from UA_detail_ua
7 as b
8 where a.id = b.id 


posted @ 2010-08-19 09:08  wenanry  阅读(367)  评论(0编辑  收藏  举报