mysql 查询表信息,递增主键id

时间:2017-08-18 10:18:31   收藏:0   阅读:335

select TABLE_SCHEMA,TABLE_NAME,TABLE_TYPE,AUTO_INCREMENT,TABLE_ROWS from information_schema.`TABLES` where TABLE_SCHEMA = ‘数据库名‘ and TABLE_NAME = ‘表名‘ ;

通过查询不同列名,获取不同的表信息, TABLE_SCHEMA = "数据库名",table_name = ”表名”, table_type = "表类型",auto_increment = “自增主键id”,table_rows = 行数? 似乎不是绝对准确。

http://www.mysqlpub.com/onlinemanual/doc/refman/5.1/zh/information-schema.html  mysql 参考手册,中文版

原文:http://www.cnblogs.com/sky-tiankong/p/7387845.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!