A few quick things to remember:

Try to always use statement delimiters

We're confused - this looks like one statement to us.
We’re confused – this looks like one statement to us.

Even before I go to execute this ‘statement’, SQL Devleoper is telling me I have a problem. The grammar check is failing. Notice those red squiggle lines? They actually mean something.

So, add a semi-colon, or do this:

Highlight what you want to run, and hit ctrl+enter
Highlight what you want to run, and hit ctrl+enter

Know the difference between executing a statement and executing a statement(s) as a script

First button executes a query, gives you a grid if it has a resultset. Second button sends the command(s) through our SQL*Plus engine and you get standard text output back.
First button executes a query, gives you a grid if it has a resultset. Second button sends the command(s) through our SQL*Plus engine and you get standard text output back.
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. Hello Jeff
    What about anonymous blocks?

    begin
    dbms_output.put_line(‘Hello’);
    end;

    select sysdate from dual;

    As soon as I have an anonymous block I cannot execute following sql statements with ctrl-enter
    Is this intended behaviour or am I missing something?
    Regards Erik

    • @Erik,

      Here is what i did in SQL Developer 4.0.2

      begin
      dbms_output.put_line(‘Hello World’);
      end;
      /

      select sysdate from dual with control – Enter the below sql get executed.

Reply To Erik Cancel Reply