Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The following two queries seem to be equivalent when executed in sql*plus:


select * from user_tables;


select * from user_tables

Is there any difference between both versions?

share|improve this question
up vote 10 down vote accepted

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 CREATE TYPE, however, you need to use the '/'

SQL> begin
  2    null;
  3  end;
  4  /

PL/SQL procedure successfully completed.

SQL> create type foo as object (
  2    col1 number,
  3    col2 number );
  4  /

Type created.

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.

share|improve this answer
Is it analogous then to SQL Server's GO? (Basically, a batch separator.) – Nick Chammas Nov 21 '11 at 16:42
@NickChammas - More or less, yes. – Justin Cave Nov 21 '11 at 16:58

And besides what Justin mentioned -- because the / runs whatever's in the buffer, it can also be used after editing the previous command, or even just to run the same command multiple times.

If you call ed in sqlplus, it'll try to write a temp file AFIEDT.BUF in your current directory, and then bring up an editor (vi, notepad, etc.), for you to edit the last command sent. One you're exited the editor, you use / to send the modified buffer.

share|improve this answer
I get nostalgic…. – bernd_k Feb 18 '11 at 14:12

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.