不是很明白:
让"赵"的资金B值为:资金B=资金B减去 资金B的20%
资金B=资金B-(资金B*0.2) 吗?

解决方案 »

  1.   

    问题1.创建存储过程:
     create proc UpdateSalary
     (
       @name varchar(20)
      )
    as 
      update salary
      set salary=salary*80%
      from hr_table
      where name=@name
    go
      
      
      

  2.   

    --question 1
    create table tbl(cname nvarchar(10),A float,B float,C float,D float)
    insert into tbl select N'李',530.25,542.36,545.65,2445.74
          union all select N'冯',580.56,220.25,918.24,5636.58
          union all select N'董',400.35,225.22,425.54,1757.66
          union all select N'赵',700.75,202.55,575.32,4222.45
          union all select N'张',600.21,220.65,663.00,5689.35
          union all select N'王',960.53,500.15,625.47,3782.20select * from tbl
    update tbl set b= round(B-B*0.2,2)  where cname in(N'李',N'王')
    select* from tbldrop table tbl
    --------------------------
    李 530.25 542.36 545.65 2445.74
    冯 580.56 220.25 918.24 5636.58
    董 400.35 225.22 425.54 1757.66
    赵 700.75 202.55 575.32 4222.45
    张 600.21 220.65 663 5689.35
    王 960.53 500.15 625.47 3782.2
    -----------------------------------------------
    李 530.25 433.89 545.65 2445.74
    冯 580.56 220.25 918.24 5636.58
    董 400.35 225.22 425.54 1757.66
    赵 700.75 202.55 575.32 4222.45
    张 600.21 220.65 663 5689.35
    王 960.53 400.12 625.47 3782.2
      

  3.   

    问题2
    先导入到SQL数据库,然后运行query,然后再导出来
    DBF文件