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.

Runs queries through the script engine, standard output back, versus one or more data grids.

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.

If you close SQLDev and re-open it, my PEEPS command will be gone. You could add these via a LOGIN.SQL script though…

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.

INFO+ is like INFO except we show you column stats instead of column comments.

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.

A mix of SQL*Plus and SQLcl commands, no problem in SQL Developer.

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.

@http://…file.sql and run with F5
Author

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

3 Comments

  1. We can use the connection startup script [login.sql] script to define all aliases for persistence

  2. 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

Reply To Fayyaz Cancel Reply