PRAGMA foreign_keys = ON; CREATE TABLE t(k PRIMARY KEY, x); CREATE TABLE u(k, x, FOREIGN KEY(k) REFERENCES t(k) ON UPDATE CASCADE); INSERT INTO t(k, x) VALUES (10, 100); INSERT INTO u(k, x) VALUES (10, 200); UPDATE t SET k = 20; SELECT k from u;
k |
---|
20 |