Home >Database >Mysql Tutorial >mysql中获取下一个自增长的id值_MySQL

mysql中获取下一个自增长的id值_MySQL

WBOY
WBOYOriginal
2016-06-01 13:28:521038browse

bitsCN.com


mysql中获取下一个自增长的id值

 

简单的一句话搞定:

 

其中的 

TABLE_SCHEMA='wanku' 代表数据库名称   TABLE_NAME='wankudata' 代表数据表的名称SELECT auto_increment FROM information_schema.`TABLES` WHERE TABLE_SCHEMA='wanku' AND TABLE_NAME='wankudata';

 

 

bitsCN.com
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn