I have the following SQL in the file, user.sql:
CREATE TABLE user ( user_id INTEGER PRIMARY KEY, username varchar(255), password varchar(255) );
However, when the following command is executed:
sqlite3 my.db < user.sql
The following error is generated:
Error: near line 1: near ")": syntax error
I would prefer to save SQL as-is, as the file will be checked in the original control and will be more convenient and readable, as it is now. Can SQL span multiple rows like this, or do I need to put all this on one line?
scripting sqlite
Justin Ethier Mar 04 '10 at 15:43 2010-03-04 15:43
source share