Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Imbedded semicolon breaks insert statement -- why?
If I do something like:
create table foo (
id integer,
text varchar2(2000)
);
insert into foo values (
1, 'this is a very long string
which wraps around several lines;
in fact, three of them');
I get a syntax error when I feed it to sqlplus. Apparantly, what's going on is the ";" imbedded in the text field makes sqlplus think the statement is terminated. I would have thought the quotes would protect it. According to the Oracle SQL Reference, the only character which needs to be escaped inside a quoted string is a quote.
Two questions: