saraswathy,
Friday, May 24, 2002, 5:21:27 AM, you wrote:

ss> Can anybody help me? is there any other specific command instead order by ID 
ss> DESC to select all the record from table where the ID is the last ID.The ID 
ss> is autoincrement.

ss> Record is like this:-

ss> ID name gender
ss> 1   a    F
ss> 2   b    M
ss> 3   c    M
ss> 4   d    F
ss> 5   e    M

ss> Result should be like this:-

ss> ID Name Gender
ss> 5  e     M

You can also do it with 2 SELECT statement:
1. Get the maximum value from the table.
2. Select row from the table where id is equal to maximum value.

Look at:
     http://www.mysql.com/doc/e/x/example-Maximum-row.html

ss> Thanks in advance




-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Victoria Reznichenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
       <___/   www.mysql.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