

Now create a table and insert some data by entering the following lines: sqlite> create table customers( name text, age int) db extension to clearly mark this as a database file. You can pick any filename you want though, but I recommend using the. We can directly give our database a name by giving it as the first argument: $ sqlite3 customers.db We need to start SQLite with the sqlite3 command again to get an SQLite shell. If you don’t have a database, let’s first create one from scratch so we have something to work with. Sqlite> Code language: Bash ( bash ) Create an SQLite database on Command Line If you already have a file-based SQLite database, however, it’s easier to directly open it like so: C:\> sqlite3 customers.db As SQLite points out to use, we can open a database by using the.

When opening SQLite without any arguments, it will create an in-memory database. Use ".open FILENAME" to reopen on a persistent database. This works the same on all the operating systems (Windows, MacOS, Linux): C:\> sqlite3Ĭonnected to a transient in-memory database. To open the SQLite shell, we must enter the sqlite3 command in a terminal or command prompt.
LINUX OPEN SQLITE DB INSTALL
If you haven’t done so already, install SQLite first. We can use the SQLite shell to browse SQLite databases.
