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

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/5540792/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-01 10:01:06  来源:igfitidea点击:

How do I increase percentage in SQL query / stored procedure?

sqlstored-procedures

提问by stoopid

How do I increase percentage in SQL query / stored procedure?[closed] been answered!

如何增加 SQL 查询/存储过程的百分比?[关闭] 已回答!

回答by Chandu

Try this:

尝试这个:

If you just want to select:

如果您只想选择:

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

If you want to update

如果你想更新

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'

回答by Nick Harrison

To select, try this:

select,试试这个:

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

to update

update

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