In this blog post, I will give a detailed view of installing SQLite3 in your Windows 11 Operating System.
1. Open a web browser of your choice and search for sqlite. Click on the first link.
2. Once the link opens, you will be able to see the downloads tab.
3. It will take you to the downloads page. I am going to install precompiled binaries for windows. Select the third option. It will start to download the zip file.
4. Once the zip file is downloaded, go to the folder and extract the files. I basically cut this folder and paste it into the C folder. I am going to rename it as sqlite3.
5. Go to that folder where the exe files are stored and copy the path. In the search icon, search for the environment as we are going to set the environment variables. Click on the path under system variables. Then, click on Ok.
6. Click on New and paste the path. Click on Ok in all the tabs.
7. Now, you can start using sqlite in the command prompt. Search for the command prompt in the search icon. Once the command prompt opens, type sqlite3 and press enter. If you see this kind of output which is available in the image below then the sqlite shell will start. From here, you can manage your database.
8. To get help from sqlite, you need to type .help and press enter. It will display all the commands that are available in the sqlite database.
9. To quit from the sqlite shell, you need to use the .quit command.
10. I am going to create a database on my directory on the desktop. Create a new folder called db. I am going to create the database in this folder. Open that folder and open the command prompt. Copy the path of your folder. In the command prompt type cd, paste the path of your folder, and press enter.
11. Type sqlite3 and the name of your database. In my case, sqlite3 mydb.db and press enter. Once you do that, your database will be created. To view your database, you need to give the command .databases and press enter. It will show all the databases that you use. After this type, create table books(id INT PRIMARY KEY); and press enter. To view your table type .tables and press enter. It will display all the tables inside your database. To see the schema of your table, type .schema books and press enter. It will display the schema of your table.
These are the steps for installing sqlite3 on your Windows 11 Operating System.
Leave a Reply