3

I'm trying to learn the SQLite with "sqlite3 -interactive" shell (under Cygwin). For supposedly all legal reasons the sqlite3 shows the following prompt every time I forget to add a semicolon at the end of commands:

...>

Is there an intelligent way out of this situation, other than hitting the Cntrl-C and restarting shell?

Edit #1

I obviously tried adding the semicolon but this doesn't seem to work:

>sqlite3 -interactive test.db
SQLite version 3.7.13 2012-06-11 02:05:22
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> insert into T1 values('Aaa ', 231 )
...> ;
...>

Edit #2

Bugs of the SQLite3 for Cygwin? It suddenly worked for me for a couple of times and then it stopped...

sqlite>
sqlite> insert into T1 values('Aaa ', 232 )
...> ;
sqlite> insert into T1 values('Aaa ', 232 )
...> ;
sqlite> insert into T1 values('Aaa ', 232 )
...> ;
...> ;
...>

Solution:

Avoid the Cygwin's SQLite and use a pre-compiled for Win SQLite3 shell. Everything works, including the command line history.

Too bad the SQLite3 that came with Cygwin doesn't work as expected... :)

Thanks, Alex

Alex
  • 150

2 Answers2

3

It's waiting for you to finish the statement. A semicolon will finish the statement. So... type the semicolon and press Enter.

1

Solution:

Avoid the Cygwin's SQLite and use a pre-compiled for Win SQLite3 shell. Everything works, including the command line history. I'm currently using the Cygwin "1.7.15(0.260/5/3) 2012-05-09".

Too bad the SQLite3 that came with Cygwin doesn't work as expected... :)

Many thanks to Ignacio Vazquez-Abrams for helping with this

Alex
  • 150