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



posted on 2021-07-20 09:14  shenggong  阅读(207)  评论(0编辑  收藏  举报

导航