Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

insert string which includes quotes in oracle

How can I insert string which includes quotes in oracle? my code is

INSERT INTO TIZ_VADF_TL_MODELS (name)
VALUES ('xxx'test'yy');

if I use

INSERT INTO TIZ_VADF_TL_MODELS (name)
VALUES ("xxx'test'yy");

I get identifier is too long error because xxx'test'yy is clob.

how can I do that?

thx.

like image 479
neverwinter Avatar asked Feb 16 '14 16:02

neverwinter


1 Answers

Try escaping the quotes:

'xxx''test''yy'

In SQL quotes can be escaped by adding another quote before them.

like image 69
Óscar López Avatar answered Oct 06 '22 16:10

Óscar López