MySQL Forums
Forum List  »  Newbie

max(id) issue
Posted by: JOHN FARRUGIA
Date: August 16, 2005 12:52PM

I have a table that is set up as follows

id auto increment, reference varchar(20), value varchar(20)
1,passed,3
2,failed,888
3,total,10
4,failed,99
5,passed,900
6,total,3

I am looking to get the last value inserted into the table for each reference value.

the result should be
2,failed,88
4,passed,99
3,total,10

Options: ReplyQuote


Subject
Written By
Posted
max(id) issue
August 16, 2005 12:52PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.