max length of int in mysql code example
Example 1: mysql get max value and id
SELECT a.id, a.rev, a.contents
FROM YourTable a
INNER JOIN (
SELECT id, MAX(rev) rev
FROM YourTable
GROUP BY id
) b ON a.id = b.id AND a.rev = b.rev
Example 2: max length found in mysql
SELECT city, max(length(city)) FROM Customers;