declare @a varchar(200) --定义一个变量来接收读取之后储存用
declare txt cursor scroll for    --定义一个txt游标参数为scroll,没有这个参数游标只能next
select fitemid from t_icitem     --在这个查询集合里面,这里面的列只能是一个,如果是两个还要定义一个变量
open txt
fetch first from txt into @a     -- 读取第一行txt游标数据存储到变量@a

update t_ICItem set FName='工资' where FItemID=@a     --更新这个表这里面的变量只能用来条件查找
delete t_ICItem where FItemID=@a  --这个是删除数据
close txt
deallocate txt

 

相关文章:

  • 2021-07-28
  • 2021-11-11
  • 2021-07-12
  • 2021-06-18
  • 2022-12-23
  • 2021-08-14
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-02-09
  • 2022-02-18
  • 2021-11-26
  • 2022-12-23
  • 2021-06-27
  • 2021-10-19
相关资源
相似解决方案