Can you define what you mean by "does not work". That is rather a vague descriptive. Perhaps an example of what you did and the results you obtained and what you expected would help here. Also note that the above only references the syntax for the declaration of foreign key constraints. Actual enforcement is a separate matter which is, by default, turned off. You need `pragma foreign_keys=on` to turn on enforcement.