SQL Plus command line: Arrow keys not giving previous commands back
The 'l' command will show the last run command (source: krenger.ch):
SQL> l 1* select owner, count(1) from dba_tables group by ownerSQL>
To get more than that, turn on history (source: dba-oracle):
SQL> set history onSQL> history 1 select * from dual; 2 select sysdate from dual; 3 show history
SQL*Plus doesn't offer this feature out-of-the-box. You have to setup rlwrap to get that going
We have built a new command line interface that supports everything SQL*Plus offers, but also includes more modern features such as previous command history. It's called SQLcl. The command history remembers your last 100 statements/scripts, even from previous sessions.