MySQL查询数据库中没有主键的表

  1. select table_schema,table_name from information_schema.tables
  2. where (table_schema,table_name) not in(
  3.     select distinct table_schema,table_name from information_schema.columns where COLUMN_KEY='PRI'    
  4. )
  5. and table_schema not in (
  6.     'sys','MySQL','information_schema','performance_schema'
  7. );


文章名称:MySQL查询数据库中没有主键的表
链接分享:http://csruizhi.cn/article/pdhgpg.html

其他资讯

Copyright © 2007-2024 成都优众联杰科技有限公司 All Rights Reserved 蜀ICP备2024116266号
友情链接: 成都网站设计 营销型网站建设 营销型网站建设 成都定制网站建设 成都网站制作 LED网站设计方案 营销网站建设 阿坝网站设计 成都网站设计 成都网站制作 企业网站制作 专业网站设计 成都网站设计 成都网站建设 定制网站建设多少钱 成都网站建设 品牌网站建设 重庆网站建设 成都网站建设公司 成都网站设计 成都网站建设公司 手机网站制作