3. Using Functions : Step 4

Demo

Show the annual salary (for 12 months) for each Employee

We can create a new field in the output with an arithmentic expression.

SQL

SELECT ename, sal*12 FROM emp

Output

ename sal*12
SMITH 9600.00
ALLEN 19200.00
WARD 15000.00
JONES 35700.00
MARTIN 15000.00
BLAKE 34200.00
CLARK 29400.00
SCOTT 36000.00
KING 60000.00
TURNER 18000.00
ADAMS 13200.00
JAMES 11400.00
FORD 36000.00
MILLER 15600.00

Progress

Proceed to Next step