get 命令是将读取文件中的内容到缓冲区
get命令的使用格式如下:
SQL> help get
GET
---
Loads a SQL statement or PL/SQL block from a script into the SQL buffer.
The buffer has no command history list and does not record SQL*Plus commands.
GET [FILE] file_name[.ext] [LIST | NOLIST]
读取在默认路径下的文件 get query_emp
SQL> get query_emp
1 select empno ,ename
2 from scott.emp
3 where empno>7788
4* and empno<7900
get命令默认是 list 列出缓冲区的内容 可以设置nolist 不显示内容
通过指定路径读取缓冲区中 get 'e:\query_emp'
SQL> get 'e:\query_emp'
1 select empno ,ename
2 from scott.emp
3 where empno>7788
4 and empno<7900
5 /
6 select empno ,ename
7 from scott.emp
8 where empno>7788
9* and empno<7900
SQL>
使用nolist 属性的效果:
SQL> get 'e:\query_emp' nolist
SQL>