The following two queries seem to be equivalent when executed in sql*plus:
1.
select * from user_tables;
2.
select * from user_tables
/
Is there any difference between both versions?
|
The following two queries seem to be equivalent when executed in sql*plus: 1.
2.
Is there any difference between both versions? |
|||
|
|
|
There is no difference for a single SQL statement. The '/' character on its own line tells SQL*Plus to execute the command in the buffer. You can use the semicolon at the end of most SQL statements as a shorthand for the '/'. If you want to execute a PL/SQL block or to execute a handful of SQL statements like
Different tools may have slightly different conventions for how you execute multiple SQL and PL/SQL statements in a script so be aware that this is SQL*Plus specific. |
|||||
|
|
And besides what Justin mentioned -- because the If you call |
|||||
|