Two simple tables:
"CREATE TABLE categories(
_id integer primary key autoincrement,
name text not null
);"
"CREATE TABLE expenses (" +
"_id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, " +
"category_name TEXT REFERENCES categories(name) ON UPDATE CASCADE , " +
"value FLOAT DEFAULT 0 NOT NULL, " +
"date DATE DEFAULT (DATETIME( NOW )) NOT NULL
);"
I m 想知道,为什么UPDATE category SET name= new name WHERE_id=1"
,t t change category_name in all rows in the cost table. 文件指出了这一点。
难道“一刀 re”的现场也许必须成为主要的关键吗?