Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

mysql select max and corresponding row

SELECT a.*
FROM YourTable a
LEFT OUTER JOIN YourTable b
    ON a.id = b.id AND a.rev < b.rev
WHERE b.id IS NULL;
 
PREVIOUS NEXT
Tagged: #mysql #select #max #row
ADD COMMENT
Topic
Name
9+2 =