SQLDeveloper: execute current line without highlighting

For those who also wonder about the same thing, here is what you gotta do. End each statement with ; and it works.

select * from item
;

select * from product;

Actually the best option is mentioned here : http://forums.allroundautomations.com/ubb/ubbthreads.php?ubb=showflat&Number=46683

1) Press Ctrl-F8 when the cursor is on the statement. Now only the current statement is executed. You can assign a different key through the preferences (Tools > Preferences > Key Configuration > "SQL Window: Execute current statement").

2) Enable the "AutoSelect statement" preference (Tools > Preferences > SQL Window). Now the standard execute function will automatically select the current statement under the cursor and execute it. To execute multiple statements you now have to explicitly select them first in the editor, or use Ctrl-F8.


If you have a block (anonymous or such) of code before your sql statement, make sure to end with forward slash, for the CTRL+enter to work.

CTRL+Enter on the select sysdate statement below works in second example below, but not on the first example.

Example 1:

begin
NULL;
end;

select sysdate from dual; -- press CTRL+Enter on this statement

Example 2:

begin
NULL;
end;
/

select sysdate from dual; -- press CTRL+Enter on this statement