August 2017
Intermediate to advanced
214 pages
4h 31m
English
The SELECT command is used to read data from our database. Start by just printing all the data in the temperature table (currently, one row):
SELECT * FROM temperature;
This will give you an output of this:
2017-06-18 12:13:50|16.7
The values of each row are separated by the | character.
Run a few more dummy inserts so that we can see the filtering capabilities of SQLite:
INSERT INTO temperature VALUES (datetime('now'), 16.9); INSERT INTO temperature VALUES (datetime('now', '+1 second'), 14.7); INSERT INTO temperature VALUES (datetime('now', '+2 second'), 22); INSERT INTO temperature VALUES (datetime('now', '+3 second'), 21.1);
Your temperature table ...
Read now
Unlock full access