Many of you might not know that most of what you can do in SQcl, can also be done in SQL Developer version 4.2.
In fact, it’s the same code that handles running statements/scripts in SQLcl as it is in SQL Developer’s SQL Worksheet.
Assuming of course, that you use THIS button.
There’s one large exception to this. TODAY: we don’t allow you to use the SCRIPT command, yet.
And one small exception: you can ALIAS a command, but it won’t persist between SQL Developer sessions. We’re not maintaining an ALIASES file in SQL Developer.
How to use it.
Simple, key in your SQL*Plus or SQlcl commands into a worksheet. Hit F5. See the output below.
Here’s an example with our bigger and better DESC – INFO.
Now, let’s get the DDL for a table, spool it to a file, format the file using SQL Developer’s formatter, and then print the contents of the file.
We Also Support @SCRIPT
You can always tell SQL Developer to execute a script using the @ syntax. Simply point to the file – either on your machine or out on the scary INTERNET.
3 Comments
We can use the connection startup script [login.sql] script to define all aliases for persistence
We use to run lot of scripts in sql plus to support business applications. We copy the script into a folder in a windows machine and then at sql plus command prompt type @ and drag and drop the script which will paste the full path of the script along with name of the script, this makes our life easy. Can this be achieved in sql Dev the same way sql plus support. I tried doing drag and drop in sql Dev but it copy the contents of the script instead of copying the path and script name, which doesn’t fullfill the purpose.
if you DnD a file from the files panel into a sqlworksheet, you’ll get the file name, but not the full path – that’s as far as I can get you right now