Oracle pl-sql escape character (for a " ' ")

Bishan picture Bishan · Jul 30, 2012 · Viewed 147.9k times · Source

When I am trying to execute INSERT statement in oracle, I got SQL Error: ORA-00917: missing comma error because there is a value as Alex's Tea Factory in my INSERT statement.

How could I escape ' ?

Answer

Codo picture Codo · Jul 30, 2012

To escape it, double the quotes:

INSERT INTO TABLE_A VALUES ( 'Alex''s Tea Factory' );