|
Re: What is the proper termination for a stored procedure created from C# code? [message #682552 is a reply to message #682551] |
Wed, 28 October 2020 12:05   |
 |
Michel Cadot
Messages: 68418 Registered: March 2007 Location: Nanterre, France, http://...
|
Senior Member Account Moderator |
|
|
Do not mistake SQL for PL/SQL; and language and the tool you use for it.
A PL/SQL statement ends with a semi-colon.
A SQL statement has not ending character.
The tool you use to send a SQL statement may have a character to end a statement which means to send the statement to Oracle.
For instance SQL*Plus, for SQL, default termination character is ';' but you can change it:
SQL> select * from dual;
D
-
X
1 row selected.
SQL> set sqlterminator '$'
SQL> select * from dual$
D
-
X
1 row selected.
SQL> select * from dual;
2 $
select * from dual;
*
ERROR at line 1:
ORA-00911: invalid character
SQL> set sqlterminator off
SQL> select * from dual
2 /
D
-
X
1 row selected.
SQL> select * from dual;
2 /
select * from dual;
*
ERROR at line 1:
ORA-00911: invalid character
For PL/SQL, as PL/SQL statement ends with a ';', you must always tells SQL*Plus the PL/SQL block is ended using '/':
SQL> begin null; end;
2
3
4
5
6
7
8
9
10 /
PL/SQL procedure successfully completed.
[Updated on: Wed, 28 October 2020 12:06] Report message to a moderator
|
|
|
|
|