Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

three dots menu of some sort windows sqlite3

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
);
like image 608
Cdhippen Avatar asked Oct 20 '25 15:10

Cdhippen


2 Answers

...> 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.

like image 144
CL. Avatar answered Oct 23 '25 05:10

CL.


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.

like image 22
Eugen FLOCEA Avatar answered Oct 23 '25 04:10

Eugen FLOCEA



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!