I\'ve read the rather cool styled BNF grammar for the SQLite create table statement
found here: http://www.sqlite.org/lang_createtable.html
I was wo
I create a table with two foreign keys and options of on update cascade and on delete cascade.
CREATE TABLE category_subcategory
(
category_subcategory_id INTEGER PRIMARY KEY,
category_id INTEGER NOT NULL,
subcategory_id INTEGER NOT NULL,
FOREIGN KEY(category_id) REFERENCES categories(id) ON DELETE CASCADE ON
UPDATE CASCADE,
FOREIGN KEY(subcategory_id) REFERENCES subcategories(subcategory_id) ON
DELETE CASCADE ON UPDATE CASCADE
);