SQL>
SQL>
SQL>
SQL> select ename, sal, sal * 1.1 from emp;
컬럼 머리글이 ENAME ,SAL,SAL*1.1이 그대로나온다.
ENAME SAL SAL*1.1
---------- ---------- ----------
SMITH 800 880
ALLEN 1600 1760
WARD 1250 1375
JONES 2975 3272.5
MARTIN 1250 1375
BLAKE 2850 3135
CLARK 2450 2695
SCOTT 3000 3300
KING 5000 5500
TURNER 1500 1650
ADAMS 1100 1210
ENAME SAL SAL*1.1
---------- ---------- ----------
JAMES 950 1045
FORD 3000 3300
MILLER 1300 1430
14 rows selected.
SQL>
SQL> select ename, sal, sal * 1.1 raise from emp;
아까와비슷 하지만 sla*1.1에 raise라는 머리글을 지정해줌
ENAME SAL RAISE
---------- ---------- ----------
SMITH 800 880
ALLEN 1600 1760
WARD 1250 1375
JONES 2975 3272.5
MARTIN 1250 1375
BLAKE 2850 3135
CLARK 2450 2695
SCOTT 3000 3300
KING 5000 5500
TURNER 1500 1650
ADAMS 1100 1210
ENAME SAL RAISE
---------- ---------- ----------
JAMES 950 1045
FORD 3000 3300
MILLER 1300 1430
14 rows selected.
SQL>
SQL>
SQL> column ename heading "Employee"
SQL> column sal heading "Salary"
SQL> column raise heading "Raise"
SQL>
SQL> select ename, sal, sal * 1.1 raise from emp;
기존에 컬럼 머리글마다 새로 지정해줬다.
Employee Salary Raise
---------- ---------- ----------
SMITH 800 880
ALLEN 1600 1760
WARD 1250 1375
JONES 2975 3272.5
MARTIN 1250 1375
BLAKE 2850 3135
CLARK 2450 2695
SCOTT 3000 3300
KING 5000 5500
TURNER 1500 1650
ADAMS 1100 1210
Employee Salary Raise
---------- ---------- ----------
JAMES 950 1045
FORD 3000 3300
MILLER 1300 1430
14 rows selected.
SQL>
SQL> drop table emp;
Table dropped.
SQL>
'데이터베이스 > PL/SQL' 카테고리의 다른 글
PL/SQL DECLARE 간단한 1+1 해보기 (0) | 2015.11.09 |
---|---|
PL/SQL SelectQuery/alias column(to_char()) (0) | 2015.11.09 |
PL/SQL Record (0) | 2015.11.09 |
PL/SQL CONSTANT (0) | 2015.11.09 |
PL/SQL Variable (0) | 2015.11.09 |