Just watched the video from @thatjeffsmith about SQLcl - and it is, indeed, worth the time. After looking that video, I'm pretty sure that SQLcl will replace SQL*Plus within months (if some more people 'spread the word').
Just a few keywords to make you curious:
- SQLcl is available as 'standalone' download, but it is also already part of the latest SQLDeveloper 17.2.0
- SQLcl needs an JRE to run
- To start SQLcl use 'sql' - not 'sqlcl'
- SQLcl has almost all features included, SQL*Plus has (simply run Your sql scripts in SQLcl instead of SQL*Plus)
- Once started, type help and You'll see all the new commands available. For example:
- alias - define aliases for often used SQL-Commands
- cd - change directory when within SQLcl
- ctas - simply type 'ctas <table> <new-table>' and You'll get the complete syntax for a 'Create Table As Select'. The ctas is loaded into the SQLcl buffer, so You could simply issue a '/' and the code is executed. Ok - You have to edit the result, because of ORA-02264 errors (Constraint already exists - but thats easy done by typing ed to start the editor
- SQLcl eases typing of statements. It can autocomplete column and table names. Example: Type 'select * from hr.empl<tab>' and it automatically autocompletes to hr.employees. If more than one possibility is available, it lists all ...
- DDL - a command to extract the ddl for a given object
- info - a 'verbose' desc which displays way more information about an object
- info+ - yes, info+! An even more informational view on an object. Interestingly, neither info nor info+ are shown when issuing an help command. But 'help information' will show how to use it.
- history - show the last 100 command You'd issued in SQLcl (customizable to any value). Even more: You can use history <index> (where index is the number of a sql statement in the history) to load a sql statement in buffer - execute it by typing / , edit it (ed) or change values using the good old 'c/<old value>/<new value>
And there is a lot more - repeat for example, which repeats a statement n times, sleeping t seconds between each execution. Watch the video and then try SQLcl!
"euphoric: intensely happy or confident" - Yes, I am :-)
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.