如何在Linux中使sqlplus保持我的查询历史? 这样我可以使用向上/向下箭头来获得我以前的查询。
rlwrap包是需要的。 像这样使用:
$ rlwrap sqlplus user/password@sid
很高兴将别名放在.bashrc中:
alias sqlplus="rlwrap sqlplus"
在这里找到答案:
http://sysdba.wordpress.com/2006/10/08/how-to-use-rlwrap-to-get-a-command-history-in-sqlplus/
从发行版“Oracle 12c release 2”(SQL * Plus版本12.2.0.1.0)开始,他们现在已经引入了history命令。
对于上/下箭头,你可能仍然需要rlwrap。
历史命令参考: