I have a MySql table person_details which contains p_id and p_name. Now, if I want to insert a record where p_name contains a single quote ', I'd execute it this way-
insert into person_details values (1, 'D\'souza');
Now, I'm trying to execute the same through a java code this way-
insert into person_details values (1, 'D\\\'souza');
and I get MySQLSyntaxErrorException.
Anything wrong?