Skip to content

kevinhellos/sqlite3Demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sqlite3Demo

Demo for using sqlite3

Commands

Initialise a database

sqlite3 database.db

Create table

E.g creating a Customers table

CREATE TABLE Customers(customer_id INTEGER NOT NULL, customer_name VARCHAR(255));

Show all tables

.tables

Show all commands use to create the table (show db structure)

.schema Customers

Show all records

SELECT * FROM Customers;

Enable foreign key constraint

PRAGMA foreign_keys=ON;

Generate all of the commands needed to recreate the database

.dump

Exit

.exit

About

Demo for using sqlite3

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published