Re: PC SQL/PLUS - Newbie Question

From: Graham Miller <lgmiller_at_elmrd.u-net.com>
Date: 1996/09/16
Message-ID: <51k8kc$jr7_at_nuntius.u-net.net>#1/1


Hi,

        Please note that a '/' on a line by itself executes the SQL command in the current buffer.

The default SQL*Plus statement terminator is ';' - this will end the statement and automatically execute it. So for SQL statements don't end it with a ';' and put a '/' on the next line - the statement will execute twice!

This changes inside a PL/SQL block. There the ';' is a statement terminator only. To cause the PL/SQL block to execute you must put a '/' on the next line after the block.

Graham - trying to be helpful.

mlanda_at_vnet.ibm.com wrote:

>In <Dx0B1E.Gxz_at_world.std.com>, pww_at_world.std.com (Paul W Woodbury) writes:
>>Just started using SQL/PLUS from my pc, and I notice many differences
>>from the UNIX version I am used to using. The one that I hope
>>someone can help with is command terminators. If a simple script
>>does two or more sql/plus commands how is each command terminated.
>>I have tried semi-colon and oracle complains, I also tried back-slash.
>>Help implies that /; or new-line will work.
>>
>>Any help is appreciated
>>
>>-Paul Woodbury
 

>A / should always work, for example:
 

>sql> select * from test
> 2 /
 

>Usually the default sql terminator is a semi-colon. To find out what
>command terminator you are using type:
 

>sql > Sho SQLTERMINATOR
 

>To set the command terminator to something other than what you
>are currently using type:
 

>sql > set sqlterminator ;
 

>Now,
 

>sql > select * from test;
 

>Will work.

>Finally, I have a feeling that your sqlterminator value is getting assigned
>during login. Check your disk to see if you have a glogin.sql or login.sql
>script. If you do check it and see if the SqlTerminator is getting
>set there then change/add your own default.

>M.Landa

Opinions expressed are mine, they are free, and worth exactly what they cost. Received on Mon Sep 16 1996 - 00:00:00 CEST

Original text of this message