I'm pretty sure there is a simple answer to this but I can't find it anywhere and can't seem to figure it out for myself.. Any help would be greatly appreciated.
I'm trying to copy a table from a .sql file (ex1.sql) that has a basic table in it. I can create this no problem but then I'm running the following to copy this table into a database (ex1.db):
sqlite3 ex1.db < ex1.sql
I'm getting the following response
C:\SQLite>sqlite3 ex1.db < ex1.sql onperson CREATE TABLE person (format 3) NB: smileyface symbol after "onperson"
first_name text,
last_name text,
age integer
)
It looks like the table is being replicated in the database or am I getting this wrong?
Anyway, when I then go back into the ex1.db there is no table there.
Any idea as to why this isn't saving? Do I need to add further commands to this to get it to save in the db file?
Apologies if this is a stupid question. Rather new to this.
Thanks!
ex1.sql? Where does this file come from?