ablog

不器用で落着きのない技術者のメモ

SQL*Plus でセミコロンは LIST コマンドと同義

SQL*Plus でセミコロンは LIST コマンドと同義なんですね。知りませんでした。

-bash-3.00$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.2.0 Production on Thu Nov 3 00:08:49 2011

Copyright (c) 1982, 2010, Oracle.  All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, Oracle Label Security, OLAP, Data Mining,
Oracle Database Vault and Real Application Testing options

SQL> select sysdate from dual;

SYSDATE
------------------
03-NOV-11

SQL> list
  1* select sysdate from dual
SQL> ;
  1* select sysdate from dual
SQL> help list

 LIST
 ----

 Lists one or more lines of the most recently executed SQL command
 or PL/SQL block which is stored in the SQL buffer. Enter LIST with
 no clauses to list all lines. In SQL*Plus command-line you can also
 use ";" to list all the lines in the SQL buffer. The buffer has no
 command history list and does not record SQL*Plus commands.

 L[IST] [n | n m | n  * | n LAST | * | * n | * LAST | LAST]

バッファにはコマンド履歴リストはなく、またSQL*Plusコマンドは記録されません。 SQL*Plusコマンドラインでは、SQLバッファのすべての行を表示するために「;」を使用することもできます。

LIST


追記(2012/06/26):