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

前端 未结 2 643
梦如初夏
梦如初夏 2021-01-20 15:41

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

相关标签:
2条回答
  • 2021-01-20 16:00

    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'
    
    0 讨论(0)
  • 2021-01-20 16:10

    To select, try this:

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

    to update

    update employee set salary = salary * 1.1 where eno = '113'
    
    0 讨论(0)
提交回复
热议问题