SQLite3 terminal: how to repeat a command? Re: Table Relations and Normalization

When working in sqlite3 environment, is there a way to repeat a command without retyping it, like in a regular terminal with arrow up button?
Currently, if I made a mistake after typing 10 lines of a query, I have to retype everything. There should be a better way. Thanks
Copy-paste doesn’t work, i.e. I can select a text in the terminal, but it doesn’t stick.

1 Like

press ‘Ctrl+a’ and then press ‘ctrl+v’ ,that works fine on my sqlite3 to paste the copied code.Or else you can use the up arrow key to access the previous line of code , remember the up arrow key only use the line by line code i.e. if my code is this:
CREATE TABLE hello(
column_1 data_type PRIMARY KEY,
column_2 data_type NOT NULL,
column_3 data_type DEFAULT 0,
table_constraints);
then the up arrow key would only show ‘table_constraints);’,
then again pressing it show ‘column_3 data_type DEFAULT 0,’ and so on .Its like the stack .

I’m having the same problem as OP. It’s interesting that the up arrow works like that for you. When I hit CTRL+c I get ^C and CTRL+V just typers ^V

What happens for me is that when I press the up arrow on the keyboard, ^[[A is what appears on the command line, not the previous line. Hitting it again just duplicates that, so know it then says ^[[A^[[A. Quitting does not seem to help, as the hint suggests. This is making the module unusable. I see there has been no answer here, so if anyone knows, that would be great.