sqlite中的外键定义
无法在sqlite中添加外键约束……。sqlite。sqlite。从sqlite 3.6.19开始,sqlite支持外键。您需要通过以下方式启用它们: sqlite>PRAGMA-foreign\u-keys=ON强> 默认情况下,为了向后兼容,它们处于关闭状态sqlite中的外键定义,sqlite,foreign-keys,Sqlite,Foreign Keys,无法在sqlite中添加外键约束……。sqlite。sqlite。从sqlite 3.6.19开始,sqlite支持外键。您需要通过以下方式启用它们: sqlite>PRAGMA-foreign\u-keys=ON 默认情况下,为了向后兼容,它们处于关闭状态 有关更多详细信息,请参阅。从SQLite 3.6.19开始,SQLite支持外键。您需要通过以下方式启用它们: sqlite>PRAGMA-foreign\u-keys=ON 默认情况下,为了向后兼容,它们处于关闭状态 有关更多详细信息,请
有关更多详细信息,请参阅。从SQLite 3.6.19开始,SQLite支持外键。您需要通过以下方式启用它们: sqlite>PRAGMA-foreign\u-keys=ON强> 默认情况下,为了向后兼容,它们处于关闭状态 有关更多详细信息,请参见sqlite 3中的 示例:
create table student (_id integer autoincrement primary key ,master_id integer);
create table master (_id integer autoincrement primary key , name varchar(30) );
select * from student where master_id in (select _id from master where name like '...')
不需要外键(主id)引用主id;
:)在sqlite 3中:
示例:
create table student (_id integer autoincrement primary key ,master_id integer);
create table master (_id integer autoincrement primary key , name varchar(30) );
select * from student where master_id in (select _id from master where name like '...')
不需要外键(主id)引用主id;
:)正如romandas所说,它在3.6.19之后确实有外键支持。正如romandas所说,它在3.6.19之后确实有外键支持。直接链接到此信息:直接链接到此信息: