Shilpa
Published in : 2022-03-01
I am using sqlite3 and created tables for the hybrid mobile applications. While executing insert query, it shows below error.
SQL error near line 16: near "s": syntax error
the line is,
INSERT INTO table_name (id, fullname) VALUES (98765, 'Robert O\'neils');
The issue is about escape character for a single quote.
I also tried double escaping the single quote (using \\\' instead of \' ), but that ain't work either.
What did I miss?
#sqlite #database
Join our community and get the chance to solve your code issues & share your opinion with us
Sign up Now
Rakshit Date : 2022-03-02
Best answers
34
Best answers
34
Mysql syntax: Working sqlfiddle, Replace single quote with single backward slash ("\") as given below.
Sqlite syntax: Working sqlfiddle, Replace a single quote with another single quote.
Shilpa Date : 2022-03-02
Understood, the syntax is different in it! I see!