加菲猫

博客园 首页 新随笔 联系 订阅 管理
  declare @tbl table(id int identity(1,1),nid int) --定义表变量  
  insert into @tbl(nid) select [id] from sfxm  order by xh asc  
  update sfxm set sfxm.xh=s.[id]  from sfxm,@tbl s where sfxm.[id]=s.nid
posted on 2008-06-10 17:27  bjh  阅读(219)  评论(0编辑  收藏  举报