Oracle SQL - Using an External Editor


You can edit the contents of the SQL buffer in two ways:

  • Use an external editor of your choice
  • Use the built-in SQL*Plus editor

The default external editor under Microsoft Windows is Notepad.

You can change or display the SQL*Plus external editor by using the DEFINE command.

SQL> define _editor=Notepad

SQL> define _editor
DEFINE _EDITOR         = "Notepad"


The SQL*Plus variable that holds the name of the external editor is _editor, with a leading underscore.

To invoke the external editor via the SQL*Plus command EDIT.

You can invoke the external editor only when your SQL buffer is not empty.

An empty buffer results in the error message "nothing to save."

Invoking the external editor starts a subprocess, and you cannot return to SQL*Plus until you have closed the external editor window.

Alternatively, you can start a separate editor session from the operating system so you can switch between two windows.

Related Topic