Last active
February 27, 2019 07:43
-
-
Save Piyush3dB/726bf7012785d6e0fd691c3655c92654 to your computer and use it in GitHub Desktop.
Sqlite sakila database
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sqlite3 | |
.read schema.sql | |
.read insert.sql | |
.tables | |
.schema | |
.save sakila.db | |
.quit | |
SELECT name FROM sqlite_master WHERE type='table' ORDER BY name; | |
.mode line | |
.mode column | |
.headers on | |
PRAGMA table_info(table_name); | |
# | |
# Creating Tables | |
# | |
CREATE TABLE account( | |
user_id serial PRIMARY KEY, | |
username VARCHAR(50) UNIQUE NOT NULL, | |
password VARCHAR(50) NOT NULL, | |
email VARCHAR(355) UNIQUE NOT NULL, | |
created_on TIMESTAMP NOT NULL, | |
last_login TIMESTAMP | |
); | |
CREATE TABLE role( | |
role_id serial PRIMARY KEY, | |
role_name VARCHAR(255) UNIQUE NOT NULL | |
); | |
View raw
(Sorry about that, but we can’t show files that are this big right now.)
View raw
(Sorry about that, but we can’t show files that are this big right now.)
View raw
(Sorry about that, but we can’t show files that are this big right now.)
View raw
(Sorry about that, but we can’t show files that are this big right now.)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment