sqlite create database code example
Example 1: how to create a database in sqlite
$sqlite3 DatabaseName.db
Example 2: create database sql
CREATE TABLE example (
id INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
username VARCHAR(50) NOT NULL UNIQUE,
password VARCHAR(255) NOT NULL,
created_at DATETIME DEFAULT CURRENT_TIMESTAMP
);
Example 3: sqlite populate database from file command shell
sqlite3 test.db
sqlite3> .read create-tables.sql