Try these questions to test your knowledge of this chapter:
- Compose a SQL CREATE statement that builds a table to hold television schedule listings. Make sure it has fields for date, time, channel, and program name. Also make sure it has a primary key and constraints to prevent nonsensical data (such as two shows at the same time on the same channel, or a show with no time or date).
- The following SQL query is returning a syntax error; can you fix it?
DELETE * FROM my_table IF category_id == 12;
- The following SQL query doesn't work correctly; can you fix it?
INSERT INTO flavors(name) VALUES ('hazelnut', 'vanilla', 'caramel', 'onion');
- The documentation for QSqlDatabase can be found at https://doc.qt.io/qt-5/qsqldatabase.html. Read up on how you can work with multiple database connections; for example, a read-only and read...