Structured Query Language (SQL)

Working with databases

Working with databases

>ATTACH DATABASE "/home/adam/Downloads/chinook.db" AS chinook;

SQLite3 show databases >.database

Working with tables within a database

Working with tables within a database

Use a database

Show tables within a database

SELECT * FROM Y

NULL as value

Working with a specific table

Working with a specific table

>SELECT * FROM Table;

Doing operations

>SELECT DISTINCT * FROM Table;

>SELECT COUNT(DISTINCT *) FROM Table;

Filters:

>SELECT * FROM Table WHERE Name="Adam";

More on filters:

+ LIKE for regex? + BETWEEN for ranges? + IN for vector + Can use multiple using AND, OR, NOT