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')

猜你喜欢

转载自blog.csdn.net/jn1705/article/details/11999443