我正在使用SQLite数据库.我有一个表,其中包含2个其他表的主键作为外键; 我想删除其中一个.这是表的代码:
protected static final String Item_places=(" CREATE TABLE "
+ Item_place + "("
+ place_id + " INTEGER ,"
+ Item_id + " INTEGER ,"
+ "FOREIGN KEY("+place_id+ ") REFERENCES " + PlaceTable + "("+ PlaceID+ " ) ON DELETE CASCADE"
+ "FOREIGN KEY("+Item_id+ ") REFERENCES "+ contentTable+ "("+contentID+"));");
Run Code Online (Sandbox Code Playgroud)