Oracle can use the GET command to read the file contents into a buffer,
The syntax for using the GET command is as follows:
Get [file] file_name {list|nolist]
Where file_name indicates that an external file is specified, and the contents of the file are entered into the sql*plus buffer.
List represents the statement in the list buffer.
Nolist indicates that the contents of the buffer are not listed.
Examples are as follows
Create a query.sql in the E-drive, where the content is
SELECT * FROM Dept
/
In the Sql*plus
Sql> Get E:\\query.sql
1* SELECT * FROM dept
Executing the contents of the buffer
Sql> Run
1* SELECT * FROM dept
DEPTNO dname LOC
---------- -------------- -------------
Ten ACCOUNTING NEW YORK
DALLAS
SALES CHICAGO
OPERATIONS BOSTON
The contents of the buffer will not be listed using Nolist
Sql> get E:\\query.sql nolist;
Sql> Run
1* SELECT * FROM dept
DEPTNO dname LOC
---------- -------------- -------------
Ten ACCOUNTING NEW YORK
DALLAS
SALES CHICAGO
OPERATIONS BOSTON
Oracle's Get Command