Column alias are used to rename column heading.
SQL> select last_name, salary, salary*2 two_times_salary from employees;
LAST_NAME SALARY TWO_TIMES_SALARY
------------------------- ---------- ----------------
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
Chen 8200 16400
11 rows selected.
SQL> select last_name, salary, salary*2 as two_times_salary from employees;
LAST_NAME SALARY TWO_TIMES_SALARY
------------------------- ---------- ----------------
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
Chen 8200 16400
11 rows selected.
SQL> select last_name, salary, salary*2 two_times_salary from employees;
LAST_NAME SALARY TWO_TIMES_SALARY
------------------------- ---------- ----------------
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
Chen 8200 16400
11 rows selected.
SQL> select last_name, salary, salary*2 as two_times_salary from employees;
LAST_NAME SALARY TWO_TIMES_SALARY
------------------------- ---------- ----------------
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
Chen 8200 16400
11 rows selected.
SQL> select last_name, salary, salary*2 "Two Times Salary " from employees;
LAST_NAME SALARY Two Times Salary
------------------------- ---------- -----------------
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
Chen 8200 16400
11 rows selected.
LAST_NAME SALARY Two Times Salary
------------------------- ---------- -----------------
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
Chen 8200 16400
11 rows selected.
No comments:
Post a Comment