MySQL Forums
Forum List  »  Views

Max value Select * from table
Posted by: chris Jones
Date: April 20, 2007 02:03PM

I need to display all of the data from highest ID value from select a name in a field.
The name field can contain duplicates so to display the last entry with a name that already exists I need to

I previously used:

select * from db where name = '$name'; This selects all the data but it seems to only display the first entry.

I also tried: select MAX(ID) from db where name = '$name' This only returned the ID number.

I need both.

I also tried: select *,MAX(ID) where db name ='name$'; Which didn't work at all.

Hope someone can help. Thanx in advance....

Options: ReplyQuote

Written By
Max value Select * from table
April 20, 2007 02:03PM
September 17, 2007 02:26AM

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.