How install and create database in SQLIite?

Installation begin from download zip file. So go to website: https://www.sqlite.org/ and click Download in menu.

In download site find Precompiled Binaries for Windows section. Download sqlite-tools ( sqlite-tools-win32-x86-3130000.zip ) file. Unzipp it in any place on your computer. Inside You see 3 files: sqldiff, sqlite3 and sqlite3_analyzer.

SQLite You may run through double-click on the sqlite3.exe file.
In this moment command-line sqlite window appear.

If you would like create persistent database You must write .open name_db , name-db notes your any name of database.
It is example for creating database of new name:

.open new.db


You see file your database in the same catalogue as sqlite programm.

It is possible to use either full pathname.

.open C:/Users/Dora/dbs/new.db


You see new.db file in given folder.

If You would like to create transient in memory database it will be sufficient to write queries in cosole without give any name of database. This database will be delete after close command line of sqlite.

create table tab(id int);
insert into tab values(23);
insert into tab values(45);
select * from tab;


If you add after queries, in last line save command and name of new database,

.save testdb.db


the content of this databse will be save in default folder:

SQLite database You may create opening windows command line. You go to folder of SQLite and create database:

Working with databse you end command:

.quit

Or

.exit

After exit database, if You would like to connect another time, write only name of existing database, in windows command line it will be:

sqlite3 new.db