如何将 CREATE_PARENT_M_LIST 表的主键设置为 CREATE_CHILD_M_LIST 的外键
这是我的疑问。
// My parent table.
public static String CREATE_PARENT_M_LIST = "create table if not exists "+
DATABASE_TABLE1 + " ( p_id integer primary key autoincrement, "
+ "table_name text);";
// my child table.
public static String CREATE_CHILD_M_LIST = "create table if not exists "
+ DATABASE_TABLE2 + " ( id integer primary key autoincrement, "
+ " symbol text," + " f_id integer,"
+ " foregin key(f_id) references " + DATABASE_TABLE1 + "(p_id));";
我在 f_id 列附近收到语法错误
提前致谢。