When I try ls -1 (in powershell) to try and get into my table and check it, I get some sort of menu "...>" that I can't .quit out of. when I close out and run sqlite3 -init ex1.sql ex1.db (my example I'm working with, I get " Error: near line 1: table person already exists " when it in fact, does not. how do I get out of this menu, and how do I fix my code? Also, what IS this menu?
My sql code:
CREATE TABLE person (
id INTEGER PRIMARY KEY,
first_name TEXT,
last_name TEXT,
age INTEGER
);
...> is shown by the sqlite3 command-line shell (not PowerShell) when you have not finished the current SQL command. Typically, you forgot the terminating ;, or you forgot a ' and are still inside a string.
Maybe you didn't specify what is the database in which you are working. For example before creating the table, use .open <name_database.db> and after run you CREATE TABLE statements.
Also the 3 dots ...> means that you didn't write the complete command, most often you didn't put the semicolon ; or you didn't close well the '. You can exit from this menu by killing the process or complete the command.
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