请问如何用sql语句查询出表之间的关系?

解决方案 »

  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';
      

  2.   

    yueliangdao0608 
    已经给出很好的解答了。
    但是,要有权限才能查询。