At 13:52 -0500 7/5/04, Mike Blezien wrote:
Hello,

what is the most effecient way to query the last record in a table, if querying the primary key(acctid) column ??

What do you mean by "last"? The row containing the largest acctid value?

You might try ... ORDER BY acctid DESC LIMIT 1.


I've tried "select *,max(acctid) as lastid from subscribers where acctid = 'lastid' group by acctid"
but this returns nothing ??


TIA :)


--
Paul DuBois, MySQL Documentation Team
Madison, Wisconsin, USA
MySQL AB, www.mysql.com

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to