SQL> select empno, ename, sal as salary, job
, nvl(comm, 0) "commission"
from emp
order by deptno;
SQL> set lines 40
SQL> /
SQL> set lines 120
SQL> set feed off
SQL> /
SQL> set feed 3
SQL> select * from emp
where rownum < 3;
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
---------- ---------- --------- ---------- -------- ---------- ---------- ----------
7369 SMITH CLERK 7902 80/12/17 800 20
7499 ALLEN SALESMAN 7698 81/02/20 1600 300 30
SQL> select * from emp
where rownum < 4;
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
---------- ---------- --------- ---------- -------- ---------- ---------- ----------
7369 SMITH CLERK 7902 80/12/17 800 20
7499 ALLEN SALESMAN 7698 81/02/20 1600 300 30
7521 WARD SALESMAN 7698 81/02/22 1250 500 30
3 개의 행이 선택되었습니다. <-- feed 값 3에 의해 3건 이상이 반환되면 메시지 출력됨
SQL> select employee_id, first_name, last_name, email
, job_id, salary, department_id as dept
from employees
order by dept;
SQL> column employee_id format 9999
SQL> col first_name format a15
SQL> col last_name for a15
SQL> col email for a20
SQL> col salary for $999,999.99
SQL> col dept for 999
SQL> col last_name heading 'LAST NAME'
SQL> col salary heading 'Monthly|Salary'
SQL> col last_name clear
SQL> break on job
SQL> select * from emp;
SQL> break on deptno skip 1
SQL> select * from emp;
SQL> tti 'Salary|Report'
SQL> bti 'Confidential'
'Oracle > SQL Fundamentals I' 카테고리의 다른 글
5일차 Edit: SQL Buffer를 편집 (0) | 2012.04.09 |
---|---|
5일차 Execution(실행,수행) (0) | 2012.04.09 |
5일차 Environment (0) | 2012.04.09 |
5일차 Miscellaneous(기타) (0) | 2012.04.09 |
5일차 # SQL*Plus의 이해 (0) | 2012.04.09 |