mysql查询没有主键的表

  • select table_schema, table_name
    from information_schema.tables
    where table_name not in (select distinct table_name
    from information_schema.columns
    where column_key = "PRI")
    AND table_schema not in
    ('mysql', 'information_schema', 'sys', 'performation_schema');
     



原文地址:https://www.cnblogs.com/shenggong/p/15033250.html