Mysql Programming Tips & Tricks





Español Français 中文 Deutsch Portuguese Japanese nederlands
   
 
Code Snippets
 List All
 Datatypes
 Other Queries
 Tables
 




Find last inserted id in mysql - Mysql

Snippets  Mysql  Find last inserted id in mysql
Snippet On
Last Insert Id




Code
  
Rate this page :
  [ 0 votes]

We can use 'max(id)' to find the last inserted id. We can also use 'lastinsertid()' function in mysql.

$query="select max(id) from table1";




Other Links

web hosting