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

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

WBOY
Release: 2016-06-01 13:28:52
Original
1019 people have browsed it

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';
Copy after login

 

 

bitsCN.com
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template