QLite Cheat Sheet
QLite Cheat Sheet
lists the most common SQLite statements that help you work with SQLite more quickly and effectively.
Managing databases
VACUUM
Managing Tables
Rename a table:
Managing indexes
Creating an index
SELECT c1, c2
FROM table_name;
SELECT *
FROM table_name
WHERE condition;
SELECT c1 AS new_name
FROM table_name;
Query data from multiple tables using inner join, left join
SELECT *
FROM table_name_1
INNER JOIN table_name_2 ON condition;
SELECT *
FROM table_name_1
LEFT JOIN table_name_2 ON condition;
SELECT c1, c2
FROM table_name
ORDER BY c1 ASC [DESC], c2 ASC [DESC],...;
SELECT *
FROM table_name
GROUP BY c1, c2, ...;
UPDATE table_name
SET c1 = v1,
...
UPDATE table_name
SET c1 = v1,
...
WHERE condition;
Search
SELECT *
FROM table
WHERE table MATCH 'search_query';