Skip navigation links

MySQL Forums :: Views :: Max value Select * from table


Advanced Search

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


Subject Views Written By Posted
Max value Select * from table 13196 chris Jones 04/20/2007 02:03PM
Re: Max value Select * from table 4209 Hakkim Badhusha 09/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.