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://csdahua.cn/article/pdhgpg.html
扫二维码与项目经理沟通

我们在微信上24小时期待你的声音

解答本文疑问/技术咨询/运营咨询/技术建议/互联网交流