I start up sqlite3 version 3.7.7, unix 11.4.2 using this command:
sqlite3 auction.db
where auction.db has not already been created.
sqlite> auction.db < create.sql;
gives me this error: near "auction": syntax error
How can I run the script?
Import the SQL file Open DB Browser for SQLite. Choose “File” > “Import” > “Database” from SQL file from the menu bar at the top of your screen.
You want to feed the create.sql
into sqlite3
from the shell, not from inside SQLite itself:
$ sqlite3 auction.db < create.sql
SQLite's version of SQL doesn't understand <
for files, your shell does.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With