SQLite : How to Install SQLite on Windows, Create Database, Table, Column

SQLite Tutorials for Beginner - How to install and make a database using embedded database SQLite on windows, mac os, linux, android or browser mozilla firefox, Chrome? This tutorial will try to explain in detail about the basics of the how to use and creation a databases, tables and columns using the Embedded Database with SQLite for step by step.

What is SQLite?


SQLite is an embedded database that is very famous for incorporating SQL interface with a very small memory and very good speed. SQLite is an open-source Embedded database that has been there long enough, it's quite stable, and is very popular on small devices.
SQLite : How to Install SQLite on Windows, Create Database, Table, Column

Support

SQLite can be used on Windows Phone, Android, iPhone, PHP, Firefox, Chrome and others with small projects. See more detailed at http://www.sqlite.org/famous.html. On the web browser, we can using SQLite to store a configuration as history, bookmarks, and the cache, while in the mobile, you can use SQLite for saving a contact numbers and more.

Licence

SQLite is Open Source (Free), so developers can use it for the purposes of the production application. To download and install them can follow my tutorial step by step.

Installation SQLite

Read : How to Install MySQL Database on Localhost windows

To install SQLite you must download it first, here i'll show you how to download SQLite databse required files, first go to http://sqlite.org/download.html and download download all rewuired files.

1. Download and Install SQLite on Windows

Required Files (Precompiled Binaries for Windows) :
  1. sqlite-dll-win32-x86-3130000.zip (422.71 KiB) for 32-bit
  2. sqlite-dll-win64-x64-3130000.zip (700.46 KiB) for 64-bit
  3. sqlite-tools-win32-x86-3130000.zip (1.51 MiB)

How to Install and crate a database with SQLite on windows?

Extract the files you've downloaded, and put in place on the disk c:, for example I will create a new folder and put all the files I've downloaded earlier in "c:\sqlite\"

Install SQLite on Windows

Create a Databases with SQLite

Just open your command prompt (CMD) windows and type "cd C:\sqlite", to crate a database just follow this command :
C:\sqlite>sqlite3 hc-kr.db
SQLite version 3.13.0 2016-05-18 10:57:30
Enter ".help" for usage hints.
Change hc-kr.db with your databases name.

How to check Our databases?

sqlite> .databases
seq name file
--- --------------- ----------------------------------------------------------
0 main c:\sqlite\.databases

How to Dumb our Databases?

c:\sqlite>sqlite3 hc-kr.db .dump > hc-kr.sql

How To create table in SQLite?

sqlite> CREATE TABLE users(
...> id INT NOT NULL PRIMARY KEY,
...> name CHAR(50) NOT NULL,
...> password CHAR(50) NOT NULL,
...> level INT NOT NULL
...> );
sqlite>

How to View structurs of the table?

sqlite> .schema users
CREATE TABLE users(
id INT NOT NULL PRIMARY KEY,
name CHAR(50) NOT NULL,
password CHAR(50) NOT NULL,
level INT NOT NULL
);
sqlite>

How to Insert Data Into Table?

sqlite> INSERT INTO users VALUES ('1','Harison Matondang','123456789','1');
sqlite> INSERT INTO users VALUES ('2','Hc-Kr-Com','1234','2');

How to View data from Table?

sqlite> SELECT * FROM users;
1|Harison Matondang|123456789|1
2|Hc-Kr-Com|1234|2

or you can type command lind with more spesifications
sqlite> .header on
sqlite> .mode column
sqlite> SELECT * FROM users;
id name password level
---------- ----------------- ---------- ----------
1 Harison Matondang 123456789 1
2 Hc-Kr-Com 1234 2

How to Delete table?

sqlite> DROP TABLE users;

Follow and subscribe For more tutorial about SQLite from us for free.