I am really glad to participate in #ThanksOGB this year. The 2017 edition (called #ThanksODC at that time) was actually the starting point of my blogging journey.
This year, I will not surprisingly talk about a Command Line Interface again : Oracle SQL Developer Command Line, as known as SQLcl.
What is it ?
SQLcl is a command-line interface for Oracle Database that combines the power of SQL*Plus and SQL Developer
Or : it is like SQL*Plus, but much better ;-). I could not live without it. OK, I work less efficiently without it.
Of course I cannot explain all the powerful features of this great tool in this blog post. Instead, I’ll give you a short list of very interesting ones, along with relevant documentation or blog posts (the Internet is full of excellent resources on SQLcl) :
Why can’t I live without it ?
Here are some reasons :
formatoption lets you format the output in many different ways, as described in this blog post by Kris Rice. In particular, I made
ansiconsolemy default using
login.sqlfile. Judge for yourself : connect to your favourite database with SQLcl, type
set sqlformat ansiconsole, run a query and let the magic happen !
- Custom aliases are easy to create. An old blog post I wrote contains some examples (and you can also define them with
login.sql). There is also a lot of already existing shortcuts to make your life easier :
APEXto list APEX apps,
create table as select,
DDLto get an object DDL …
- Simple but useful, auto-completion of keywords works with tab !
- One feature that I haven’t tested yet but looks promising is the integration of Liquibase starting from version 19.2. Here is a blog post by Jeff Smith and the official documentation regarding this feature.
- And last but not least, emojis can be used as a delimiter \o/
I hope you are now convinced that SQLcl is your new best friend ! And if you want to learn new tricks regularly, follow @oraclesqlcl on Twitter !