MySQL统计数据库表中是否有自增长列

2014-11-24 11:22:02 · 作者: · 浏览: 0
MySQL统计 数据库表中是否有自增长列
/*统计
数据库
表中是否有自增长列*/ SELECT distinct table_name FROM INFORMATION_SCHEMA.columns d where d.table_name in(select table_name from INFORMATION_SCHEMA.tables where table_schema not in ('INFORMATION_SCHEMA','performance_schema','dmc_db','mysql')) and d.extra = 'auto_increment')