I'm trying to create a new SQLite database from scratch by writing the schema for my new tables (only one so far though), and the INSERT statements for that table in one file.
Then I go into sqlite3 and try to create the database as follows:
$ sqlite3 newdatabase.db
SQLite version 3.4.0
Enter ".help" for instructions
sqlite> .read ./schema.sql
SQL error near line 16: near "s": syntax error
Line 16 of my file looks something like this:
INSERT INTO table_name (field1, field2) VALUES (123, 'Hello there\'s');
So the problem there is the escape character for a single quote, but I cannot figure out why this is not working. I already tried double escaping the single quote (using \' instead of \'), but that didn't work either.
What am I doing wrong here?