Find the answer to your Linux question:
Results 1 to 4 of 4
Hi, I am using Oracle 10g Express Edition on Fedora core 5 32+ bit os. The problem is when I use the SQL Plus command line to make SQL statements ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Newbie
    Join Date
    Sep 2006
    Posts
    175

    SQL Plus command line: Arrow keys not giving previous commands back


    Hi,

    I am using Oracle 10g Express Edition on Fedora core 5 32+ bit os. The problem is when I use the SQL Plus command line to make SQL statements I can not get the previously typed command back at the prompt when I use the up and down arrow keys on my keyboard. This is quite easy when I am using a shell, but here with this Oracle command line interface it is not working at all. Here is the example as what actually is happening whe I press the up or down arrow keys.

    SQL> drop table mailorders;

    Table dropped.

    SQL> ^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A^[[A


    Any suggestions ? Thanks............

  2. #2
    Just Joined!
    Join Date
    Feb 2005
    Posts
    33
    You cannot do this using sqlplus.
    It wasn't designed for this feature. It's a pain but I've learned to live with it.

    You can view the last command by typing "list" at the SQL> prompt.
    You can modify the last command by typing "edit" at the SQL> prompt.

    This will allow you to edit the last SQL command with your editor of choice.
    To set the editor (since ed is the default) type the following at the SQL> prompt:
    define _editor = vi

  3. #3
    Linux Newbie
    Join Date
    Sep 2006
    Posts
    175
    Quote Originally Posted by japlha
    You cannot do this using sqlplus.
    It wasn't designed for this feature. It's a pain but I've learned to live with it.

    You can view the last command by typing "list" at the SQL> prompt.
    You can modify the last command by typing "edit" at the SQL> prompt.

    This will allow you to edit the last SQL command with your editor of choice.
    To set the editor (since ed is the default) type the following at the SQL> prompt:
    define _editor = vi
    Thanks mate.

  4. #4
    nwa
    nwa is offline
    Just Joined!
    Join Date
    Jun 2010
    Location
    Minneapolis, MN
    Posts
    1

    Strange

    Seeing as SQL*PLUS in Windows supports full command-line history it seems quite odd to me that the Linux port would leave this feature out (since *nix has supported command-line history longer than DOS has)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •