miércoles, 13 de marzo de 2013

ORACLE-SQLPLUS-editar sentencias en sqlplus. DEFINE _EDITOR

Este es un tip bastante fácil y útil.

Cuando se escribe  una sentencia en sqlplus y se necesita corregir o modificar, se debe volver a escribir la sentencia completa.
sqlplus cuenta con un editor interno, el cual es posible de configurar defininiendo la variable EDITOR.

Por default sqlplus no cuenta con ningún editor en particular:


SQL> define
DEFINE _DATE       = "13-MAR-13" (CHAR)
DEFINE _CONNECT_IDENTIFIER = "clarope" (CHAR)
DEFINE _USER       = "TAMP" (CHAR)
DEFINE _PRIVILEGE      = "" (CHAR)
DEFINE _SQLPLUS_RELEASE = "1002000500" (CHAR)
DEFINE _EDITOR       = "ed" (CHAR)
DEFINE _O_VERSION      = "Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options" (CHAR)
DEFINE _O_RELEASE      = "1002000500" (CHAR)