Reputation: 27
I'm a beginner in PL/SQL, I'm trying some sql script but sometimes I have an error in my script and the prompt doesn't appear; I remain in input mode.
How can I retrieve the prompt without shutting down the terminal?
(p.s.: I used sql plus for oracle 11g under Ubuntu OS)
Upvotes: 0
Views: 1288
Reputation: 191570
From the documentation
SQL*Plus treats PL/SQL subprograms in the same manner as SQL commands, except that a semicolon (;) or a blank line does not terminate and execute a block. Terminate PL/SQL subprograms by entering a period (.) by itself on a new line. You can also terminate and execute a PL/SQL subprogram by entering a slash (/) by itself on a new line.
If you're entering a PL/SQL block and getting numbered prompts, enter a period (.
) on its own and you'll drop back to the SQL>
prompt.
SQL> declare
2
3
4
5 .
SQL>
The code you entered will still be in the buffer and you can run it with /
, or edit it in your configured text editor with edit
. (You can set that with define _editor = "/usr/bin/vim"
, for example).
Upvotes: 1