background image

SQL> l
  1  select * from emp
  2  where sal > 2000
  3* and deptno = 20
SQL> l 2 3
  2  where sal > 2000
  3* and deptno = 20
4->/ 执行缓冲区的内容
SQL> l
  1  select * from emp
  2  where sal > 2000
  3  and deptno = 20
  4* and ename = 'SCOTT'
SQL> /
 
     EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
---------- ---------- --------- ---------- --------- ---------- ---------- ----------
      7788 SCOTT      ANALYST         7566 19-APR-87       3000                    20 
5->n 设置当前行
SQL> 2
  2* where sal > 2000
SQL> 3
  3* and deptno = 20 
6->n text 用 text 内容替换第 n 行
SQL> l
  1  select * from emp
  2  where deptno = 20
  3* and sal > 2000
SQL> 2 where ename = 'SCOTT'
SQL> l
  1  select * from emp
  2  where ename = 'SCOTT'
  3* and sal > 2000
7->

  

; 对于已输入完毕的

SQL 语句,输入;号表示该语句输入完毕。对于设置语句可以不

使用分号

,如上述的 help desc

 
8->APPEND text(简写 A text) 将 text 的内容追加到缓冲区尾部
SQL> l
  1* select * from emp
SQL> a where sal > 2000;
  1* select * from empwhere sal > 2000
9->CHANGE/old/new(简写 C /old/new) 将当前行中的 old 替换为 new
SQL> l
  1  select * from emp