Thursday, March 12, 2015

Arithmetic Operation In SQL.

SQL> select last_name, salary, salary*2 from employees;

LAST_NAME                     SALARY   SALARY*2
------------------------- ---------- ----------
King                           24000      48000
Kochhar C                      17000      34000
De Haan                        17000      34000
Hunold                          9000      18000
Ernst                           6000      12000
Austin                          4800       9600
Pataballa                       4800       9600
Lorentz                         4200       8400
Greenberg                      12008      24016
Faviet                          9000      18000

10 rows selected.

In this query third column showing two times of employee salary.

No comments:

Post a Comment