Skip to Main Content

SQLcl: MCP Server & SQL Prompt

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

is it possible to run something like "history XX run" with sqlcl

user499562Jul 4 2018 — edited Jul 5 2018

Hi,

I'm playing around with sqlcl and I was wondering if it is possible to re-run a command (without copy/pasting it in the console) that is in the history buffer.

f.ex. running the history command returns a lot of entries, and if I would like to rerun the following commands f.ex:

48  select * from employees;

49  select * from regions;

In sqlplus you can do something like:

history 48 run

or

history 49 run

and the commands are run again.

>help history

doesn't seem to have any similar commands

history [<index> | FULL | USAGE | SCRIPT | TIME | CLEAR (SESSION)?]

Is it possible to do the same in sqlpl or something similar?

Or would you have to copy/paste it, or scroll history with the up/down keys (+ enter)?

Thanks a lot!

Didier

This post has been answered by Glen Conway on Jul 4 2018
Jump to Answer
Comments
Post Details
Added on Jul 4 2018
4 comments
501 views