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','')) and d.extra = 'auto_increment')