I am using android sqlite3 command line tool. How do I repeat the last command that I executed (similar to the / in sqlplus)? Tried up arrow and . - both didnt work. I am on Mac :(
In SQLite, the INSERT INTO statement is used to add new rows of data into a table. After you create the table, this command is used to insert records into the table. You can view the output by using the SELECT statement.
The sqlite3 program is able to show the results of a query in eight different formats: "csv", "column", "html", "insert", "line", "list", "tabs", and "tcl". You can use the ". mode" dot command to switch between these output formats.
Check the list of dot commands by using the ". help" at anytime. For example: Sqlite> .
You can terminate the sqlite3 program by typing your systems End-Of-File character (usually a Control-D). Use the interrupt character (usually a Control-C) to stop a long-running SQL statement.
I now fall into the same problem.
When I type up, it prints ^[[A
.
when I type left, it prints ^[[D
. And it is similar to down and right
And I found this question( Sqlite using command line) and solove it.
First, rename the sqlite3 to sqlite3_bak in android tools to make it disable, or you can directly remove it, if you can make sure you will not use it again.
Second, download the "autoconf" source from http://www.sqlite.org/download.html (second link, currently to http://www.sqlite.org/sqlite-autoconf-3071502.tar.gz ):
then cd to the decompressed directory and compile it via the terminal
$ ./configure
$ make
$ sudo make install
Third, put your "new sqlite3 binary" to /opt/local/bin
directory or set a soft-link to this file. And source your .bash_profile
or .bashrc
.
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