Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

share|improve this question
1  
Add the semicolon? –  Xavierjazz Aug 5 '12 at 23:14
    
Not forgetting a semicolon is always a good idea. What should I do if I already missed one? –  Alex Aug 5 '12 at 23:24
    
"SQLite3 for Cygwin" How come you're not using a native client? –  Ignacio Vazquez-Abrams Aug 5 '12 at 23:48
    
@IgnacioVazquez-Abrams Not sure what you mean. I'm using the SQLite that came with the cygwin (/usr/local/bin/sqlite3) –  Alex Aug 5 '12 at 23:55
    

2 Answers 2

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

share|improve this answer
    
Thanks, this doesn't seem to work. I've updated the question with the logs. –  Alex Aug 5 '12 at 23:31
    
Works fine here. sqlite> insert into T1 values('Aaa ', 231 ) ...> ; sqlite> –  Ignacio Vazquez-Abrams Aug 5 '12 at 23:36
    
Very strange. Seems like glitches of my cygwin/sqlite3... See Edit #2. –  Alex Aug 5 '12 at 23:47

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.