Richard Morton a écrit :
> 
> Hello,
> 
> I have a simple query, and a problem countless people must have had, I just
> cannot work it out at the moment, I am new to MySQL; I hope you can help.
> 
> My current statement looking at the manual.
> SELECT * FROM contacts WHERE age=MAX(age);
> 
> I started with:
> mysql> select * from contacts where age=(select MAX(age) from contacts);
> 
> In escence I am trying to ascertain the details of the person who is oldest.
> 
> Any suggestions.?
> 
> Richard
> 

hi,

This request should work:
SELECT * FROM contacts ORDER BY age DESC LIMIT 1;

Hope this helps
--
Joseph Bueno
NetClub/Trader.com

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to