An Entrepreneur, Coach, IT Consultant, Strategic Adviser, and a Traveler craving to explore and contribute to forming a better society.

Saturday, January 23, 2010

How to make Backspace & Delete Key work in Oracle SQLPLUS?

2 comments :
Image Courtesy: Pixabay.com

It will be really irritating if the keys that was working for you in all the applications, but not in Oracle SQLPlus. I had to go through this situation; I had struggled a lot and irritated about this behaviour as this made me lose nothing but the golden time.

After a couple of attempts on reading Oracle SQLPlus documentation, I found the trick to make my "Backspace" and "Delete" keys work for me in SQLPLUS.

Problem:
Backspace and Delete keys are not working in Oracle SQL Plus.

Solution:
Run this command from your sqlplus "!stty erase [BACKSPACE]"

Note: Don't type "BACKSPACE" but press backspace key  instead.

You can also add this into .cshrc / .kshrc / .profile

Other Tips in SQLPLUS:
  • Ctrl + Backspace - Back Arrow
  • 1 - Will execute the last query that was successfully executed
  • edit - To edit the last query in the VI Editor
  • @/path/to/filename.sql - To execute a sql script file
  • @@filename.sql - To execute a sql script file which in the same directory from where you logged onto sqlplus

Read my other popular articles:

2 comments :

amit said...

Thanks for your post. really helpful is getting rid of irritating sqlplus old behaviour.

JoseA. said...

Thank you for this trick.
Really annoying behaviour with backspace in sqlplus now it is fixed!.