【SQL开源代码栏目提醒】:网学会员为需要SQL开源代码的朋友们搜集整理了335.sql相关资料,希望对各位网友有所帮助!
declare @id char(20)
declare @ids char(20)
declare @names char(20)
set @id='CDD001'
declare a_cursor cursor
for select 员工编号, from tb_update16
open a_cursor
fetch next from a_cursor
into @ids,@names
while @@fetch_status=0
begin
if @id=@ids
begin
update tb_update16 set ='小陈丹' where 员工编号=@ids
end
fetch next from a_cursor
into @ids,@names
end
close a_cursor
deallocate a_cursor
select * from tb_update16