如何在SQL查询/存储过程中增加百分比?

时间:2011-04-04 15:31:13

标签: sql stored-procedures

如何提高SQL查询/存储过程的百分比?[已关闭]已经回答了!

2 个答案:

答案 0 :(得分:6)

试试这个:

如果您只想选择:

SELECT ename, esalary * 1.1 
  INTO name, salary 
    FROM employee 
 WHERE eno='113'

如果您想要更新

UPDATE employee
   SET salary =  salary * 1.1 
--If the base salary is store in esalary then use 
--SET salary = esalary * 1.1
 WHERE eno='113'

答案 1 :(得分:1)

select,请尝试以下操作:

select  name, salary * 1.1 from Employee where Eno='113';

update

update employee set salary = salary * 1.1 where eno = '113'