Friday, November 26, 2010

Get maximum ID from a table

To get the maximum id from a table you can use the MAX() function.
Here’s an example:

SELECT MAX(id_field_here) as max_id FROM `table`;

No comments:

Post a Comment