Add limit to 1 and you will get just the last one.
> am i misunderstanding or should you try SELECT * FROM mytable SORT BY id
> DESC;
>
> row 0 should be the last added record..
> .
>
>
>
> _____
>
> Roy Nasser ( roy@stripped <mailto:roy@stripped> )
> Diretor Tecnico
> http://Vem.ca/ <http://ww.Vem.ca/>
> +55-11-3347-3011
> +55-11-9953-8853 (Cel.)
> +55-11-211-0889 (Fax.)
> _____
>
>
>
>
> > -----Original Message-----
> > From: tech@stripped [mailto:tech@stripped]On Behalf Of
> > Fernando
> > Sent: Thursday, February 03, 2000 5:59 PM
> > To: mysql
> > Subject: A little question ..
> >
> >
> >
> > How can I select the last inserted row in a table, using only one
> > query? The table has an auto_increment field, called ID...
> > Using two queries it is easy, but I am curious...
> >
> > --
> > Fernando Costa de Almeida
> > falmeida@stripped
> >
> > --
> > ---------------------------------------------------------------------
> > Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before
> > posting. To request this thread, e-mail mysql-thread26506@stripped
> >
> > To unsubscribe, send a message to:
> > <mysql-unsubscribe-roy=vem.ca@stripped>
> >
>
>
> --
> ---------------------------------------------------------------------
> Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before
> posting. To request this thread, e-mail mysql-thread26509@stripped
>
> To unsubscribe, send a message to:
> <mysql-unsubscribe-claudia=shiny.gsfc.nasa.gov@stripped>
>