break命令将重复的列 分成一组显示 假设 scott方案中的列job进行break
SQL> select job,ename from emp order by job;
JOB ENAME ------------------ -------------------- ANALYST SCOTT ANALYST FORD CLERK MILLER CLERK JAMES CLERK SMITH CLERK ADAMS MANAGER BLAKE MANAGER JONES MANAGER CLARK PRESIDENT KING SALESMAN TURNER SALESMAN MARTIN SALESMAN WARD SALESMAN ALLEN 已选择14行。SQL> break on job;
SQL> select job,ename from emp order by job; 这里显示的结果 相同的job只有第一个被显示了 其他的去掉了 只是一种显示的方式而已 JOB ENAME ------------------ -------------------- ANALYST SCOTT FORD CLERK MILLER JAMES SMITH ADAMS MANAGER BLAKE JONES CLARK PRESIDENT KING SALESMAN TURNER MARTIN WARD ALLEN清除break
SQL> clear breaks;
breaks 已清除 SQL> select job,ename from emp order by job; JOB ENAME ------------------ -------------------- ANALYST SCOTT ANALYST FORD CLERK MILLER CLERK JAMES CLERK SMITH CLERK ADAMS MANAGER BLAKE MANAGER JONES MANAGER CLARK PRESIDENT KING SALESMAN TURNER SALESMAN MARTIN SALESMAN WARD SALESMAN ALLEN 已选择14行。