SQLite in Command line Installation guide

Windows

Kasichennupati
4 min readFeb 26, 2023

SQLite is a must-have for every data enthusiast and I personally like SQLite for the following reasons:

  • Easy to build your proof of concepts
  • The best tool to practice your SQL Queries
  • Personal portable Data Base
  • Most used data base in the world everything from (mobile apps, web apps and IOT devices use this as the first database to store the data)

But the thing I love the most is its “Open Source” and “Free to use”

CLI Installation in windows

go to the downloads page of sqlite and find the windows binary files depending on the system download 32bit or 64bit files

Sqlite3 Download page

A few great things we can notice in the website that shows the teams commitment to staying organised is the sqlite is versioned with the convention 3.X.Y meaning as of this observation the latest version is 3.41.0 also can be seen in the download link. but, if you notice the file name end it’s written 3410000 (3 XX YY ZZ ) this is because if you sort the files then its always sorted in the order of the latest version software. Here ZZ is reserved for a specific branch version.

Now, for the windows installation we need to download the file formatted like this “sqlite-tools-win32-x86–3XXYYZZ.zip” and depending on your base system download “sqlite-dll-win(32/64)-x(86/64)-3XXYYZZ.zip”. Once the download is finished unzip the sqlite-tools zip file and you will find the files as following.

  • sqlite3.exe
  • sqlite3_analyzer.exe
  • sqldiff.exe
Sqlite3-tools zip file contents

Now copy all of these three files and paste them in a folder preferably in root C:\sqlite3 or in root of your profile C:\Users\{user_name}\sqlite3\

we are almost there to use the command line tool
Go to your system variables and this to your path follow the below images you should be good type “Edit variables” in your search bar and you will see options like edit system environment variables or your account variables.
System variables need administer access and user variables do not need admin access(unless your admin blocked it in this case ask the admin to set this for you).

search environment variables
system properties
System and User environment variables

Double Click in either of the menu on the variable “Path” if you added the files to your user root then user variables if you added to your C root then system variables.

New Environment variable

add the path as shown and click ok on all other prompts.

That’s it you just installed the core of sqlite3 in your system now let’s focus on how to use it.

open a new terminal(command prompt or powershell ) window this will load the new environment variable in to the session and type sqlite3 and it should get you in to the sqlite3 cli app as shown

Test your installation

That’s it now you can start using sqlite in windows command line and play around

you need to use sqlite3 cli commands or called as Dot-Commands to interact with the cli app more in the documentation here

start typing “.help” and go from there…

--

--

Kasichennupati

I am a Machine Learning Engineer and a Data Addict. Trying to contribute as much as I can to the Data Hive