How to SAVE SQL prompt content into Text file?

Read this Oracle Tutorial Point article to know how to save SQL prompt content into a file. In SQL prompt we will execute the multiple queries. If once we reopen SQL prompt, we miss the list of queries which we have executed previously. To avoid this problem, it's always better to store the data into the physical file. The SAVE command is used to store the current content of the SQL buffer.

Steps are:
  1. At the SQL Prompt type the full name of the path where the file has to be saved.
  2. Give line name of the file with .sql extension.
  3. If the file has to be replaced with already existing name then use the REPLACE ALL clause.
Example:

SQL> SAVE C:\Users\Subba Reddy(Your computer account id)\Documents\Script files\Insert_Prompt.sql

SQL> SAVE C:\Users\Subba Reddy(Your computer account id)\Documents\Script files\Insert_Prompt.sql REPLACE ALL

Comments