In this post, I’m going to show you how to:

  • ‘cancel’ yourself out of a buffer/command
  • cancel a query
  • ctrl+c yourself back to the shell/cmd prompt

Starting over on your query/script

Ctrl+C will kill you out of SQLcl completely if you’re in the editor. This is a bug on one of the components we’re using (JLINE), and we have a fix scheduled for SQLcl 19.2. But in the meantime, using the ESC key will provide you all the relief necessary.

You start typing, and at some point, you realize, there’s no fixing this, let’s just start over.

Hit ESC to exit the editor, and we’ll leave the buffer contents instact

Again, we hope to have this working with Ctrl+C in version 19.2 of SQLcl.

Cancelling a query

You’ve successfully submitted your query or anonymous block to the database. Now we want to cancel it. Ctrl+C will send that request.

Now at that point, it’s up to the jdbc driver and the database to decide how and WHEN to handle that request.

Here’s an example.

Issue your Ctrl+C and wait.

I’m tired of waiting just get me out of here already

Just hit ctrl+c, again.

Yes, I know, I’m not the best typist out there.

Making this more transparent going forward

We also plan in version 19.2 to print status messages to the window. For example, when you send the query cancel, we’ll register that and let you know we’re working on it, so you don’t get frustrated and hit the button again.

I’m also told that in 19.2 with the new JLINE toys, we’ll be able to do some wicked-cool vi integration.


I'm a Master Product Manager at Oracle for Oracle SQL Developer. My mission is to help you and your company be more efficient with our database tools.


Write A Comment