Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Simple SQL+ question
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