ITeye博客

SQL Server 精典语名

siashuayongsheng · 2009-09-22 23:42 · java面试笔试大全 · SQL Server · SQL · Markdown

declare @name varchar(20),@sid varchar(30) declare cur cursor for select 姓名,F11 from Sheet1$ open cur fetch next from cur into @name,@sid while @@fetch_status = 0 begin if @sid is not null begin print 'update .htbz.dbo.t_Worker set wk_sid = '+@sid+' where wk_name = '+@name+'' update .htbz.dbo.t_Worker set is_ywbx = 1 where wk_name = @name end fetch next from cur into @name,@sid end close cur DEALLOCATE cur

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。