create table inno_1 (id int not null primary key) engine innodb; create table inno_2 (id int not null key, constraint fk_inno_1 foreign key(id) references inno_1(id)) engine innodb;select * from information_schema.TABLE_CONSTRAINTS where constraint_schema = 'datumdm' and constraint_name = 'fk_inno_1';
create table inno_1 (id int not null primary key) engine innodb;
create table inno_2 (id int not null key, constraint fk_inno_1 foreign key(id) references inno_1(id)) engine innodb;select * from information_schema.TABLE_CONSTRAINTS where constraint_schema = 'datumdm' and constraint_name = 'fk_inno_1';
已经给出很好的解答了。
但是,要有权限才能查询。