作者:陈怡淑611947 | 来源:互联网 | 2018-04-13 08:18
bitsCN.com
MySQL统计数据库表中是否有自增长列
/*统计数据库表中是否有自增长列*/SELECTdistincttable_nameFROMINFORMATION_SCHEMA.columns d where d.table_name in(select table_name from INFORMATION_SCHEMA.tables where table_schemanot in ('INFORMATION_SCHEMA','performance_schema','dmc_db','mysql')) and d.extra = 'auto_increment')
bitsCN.com