Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Simple SQL+ question

Re: Simple SQL+ question

From: Martin Haltmayer <Martin.Haltmayer_at_0800-einwahl.de>
Date: Wed, 06 Sep 2000 14:31:56 +0200
Message-ID: <39B6393C.64EABE54@0800-einwahl.de>

create table mytable (a varchar2 (100), b varchar2 (100), c varchar2 (100));

insert into mytable (a, b, c) values ('First Column' , 'First Line of Second Column
Second Line of Second Column'
, 'Third Column');

select * from mytable;

drop table mytable;

Mind the line break in the example after the words "First Line of Second Column"! A string literal can span several lines!

Martin

Persian Computing wrote:
>
> Hi there,
>
> I have a simple question with regard to use the NewLine code in a SQL Plus
> script as follows:
>
> insert into MyTable values ('First Column','First Line of Second
> Column\nSecond Line of Second Column','Third Column');
>
> I guess this doesn't work since SQL Plus is not aware of \n as NewLine
> character!
>
> Can someone explain how NewLine code can be added to the SQLPlus scripts?
>
> BTW: I even used: SET Esc \ before my Insert command but it didn't help!
>
> Thanks in advance,
> N. Silakhori
Received on Wed Sep 06 2000 - 07:31:56 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US