What is the difference between REFERENCES with, or without a FOREIGN KEY What is the difference between REFERENCES with, or without a FOREIGN KEY sqlite sqlite

What is the difference between REFERENCES with, or without a FOREIGN KEY


The FOREIGN KEY syntax is more flexible than defining it inline in the column definition (e.g., it allows you to define a composite foreign key, where the combination of two or more fields should exist in the referencing columns).

In your case, there is no difference between the two DDL statements. One could say that the inline definition of foreign keys is nothing more than syntactic sugaring.