Assuming you are using the Oracle sqlplus client... it does not support command line editing and history using the arrow keys. For this to work you will have to install a product called Readline Wrapper. See my answer at the General Database forum: sqlplus command line editing