#485 execute multiple SQL statements on one click without selection before

General
open
nobody
None
5
2014-02-12
2013-12-05
wolfgang
No

When I have multiple SQL statements in the SQL window and I do CTRL+ENTER (or press the button), only the current SQL statement is executed.
To execute all SQL statements in my window, I have to mark all (so cursor jumps at bottom) and then CTRL+ENTER.
To continue modifing my SQL, I have then to sroll up until I'm on the line to work on.

Maybe I missed it in 3.5.0, but why not having a second button and shortcut (e.g. CTRL+SHIFT+ENTER, or better configurable) which executes complete SQL window statements from top to bottom, and leaves cursor where it is ...

Discussion

  • sfst
    sfst
    2014-02-12

    "[..]which executes complete SQL window statements from top to bottom, and leaves cursor where it is ..."

    That would be horrible if I ever pressed that shortcut by accident (so I would remove that shortcut).

    Actually CTRL-ENTER executes all statements in the current BLOCK. So if you don't make empty lines in between, you can get a lot of statements executed with one single CTRL-ENTER. You can "glue" statements together with comments

    --
    select 'The 1st command' from dual;
    --
    select 'The 2nd command' from dual;
    --
    select 'The 3rd command' from dual;

    It won't move the cursor either.

     
    Last edit: sfst 2014-02-12