自身关联
CREATE TABLE Business (ID varchar(50) NOT NULL PRIMARY KEY,Name varchar(200) NOT NULL,"Parent_ID" varchar(50),ConfigurationPage boolean NOT NULL,
FOREIGN KEY(Parent_ID) REFERENCES Business(ID) on delete cascade
)
PRAGMA foreign_keys=ON;delete from business where [ID]=1
原文链接:https://www.f2er.com/sqlite/201957.html