189 8069 5689

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查询数据库中没有主键的表
网站URL:http://jkwzsj.com/article/pdhgpg.html

其他资讯