Eric Guesdon wrote:
> Hi everyone,
>  
> I’m a new user on this list as well as Mysql.
>  
> I use it with coldfusion 
>  
> My first problem is the following :
>  
>             I have a table where I created a timestamp column named
> date_creation
>  
>             When I try to execute this sql syntax it doesn’t work !
>  
>                         select fname, lname, date_creation
>        from tb_person
>        where date_creation = (select max(date_creation) from tb_person)
>  
>             I know subselect is limited but what are alternatives
> solutions ?
>  
> Thanks
>  
> Sorry for my English
>  
> Eric
> 

Hi,

You should try:

select fname, lname, date_creation
  from tb_person
order by date_creation desc limit 1;

and look at : http://www.mysql.com/doc/en/ANSI_diff_Sub-selects.html
for other examples.

Regards,

Joseph Bueno


---------------------------------------------------------------------
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