Multi-line queries in SQLite shell

Just after writing that debugging multi-line queries in SQLite shell is not easy, I discovered a cool trick on the sqlite forum:

Use Ctrl+V, Ctrl+J instead of Enter for new lines. After that, edit the query with the button.

SQLite shell

And here are some more ways to edit multi-line queries:

  • Use external editor (.shell <editor> <file>)
  • Run query from file (.read <file>)
  • Consider DBeaver, DataGrip or other UI tool

Follow @ohmypy on Twitter and subscribe by email to keep up with new posts 🚀