Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to exit dbshell (SQLite 3) on the command line when using Django?

How do I exit dbshell (SQLite 3) on the command line when using Django?

It's my first time to use the command. I watch a book and am practicing Django at the same time. After I run this command, I have no idea how to leave the environment since I have never learned SQL before.

like image 435
Philipl Avatar asked Jul 11 '26 14:07

Philipl


2 Answers

The exit key is determined by what SQL back end you're running.

If it's SQLite 3, like this question, it should be quit.

If it's PostgreSQL, like my case, it's \q.

like image 50
Mitchell van Zuylen Avatar answered Jul 14 '26 03:07

Mitchell van Zuylen


You may use '.quit' to exit the SQLite shell. Please mind the dot in front.

More reference from here: SQLite CLI

like image 40
abhishek kumar Avatar answered Jul 14 '26 04:07

abhishek kumar