Hello All,

    Is it possible to do nested select statements with MySQL ?  Basically I'm trying 
to display the last 5 rows that got inserted into a table.  My SQL query looks like 
this:

select * from tablename limit ((select count(*) from tablename) - 5), -1;

    In theory it works for me :) but MySQL complains.  Is it possible to do nested 
queries with MySQL ?  Does anyone have a better way of displaying the last x amount of 
rows inserted into a table ?  Thanks in advance...

-Pete

Peter Vertes
Beast Financial Systems
404 Fifth Avenue
New York, NY
10018

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