This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
The SQL that you need to do this would depend upon the database that you are connecting to. On Oracle you could do something like: SELECT * FROM MYTABLE ORDER BY DATE_CREATED DESC WHERE ROWNUM <= 1000 The order by clause will sort the records so that the most recent ones are retrieved first, the where clause will then limit the no of records returned. I am not sure of the syntax for other DBs but it will be pretty similar if it is supported at all. Hope this helps [ March 28, 2003: Message edited by: Andy Bowes ]
Andy Bowes<br />SCJP, SCWCD<br />I like deadlines, I love the whoosing noise they make as they go flying past - Douglas Adams
Joined: Jan 23, 2002
Thanks andy, but i am using MySQL, do anyone know if there's any method can work in mysql?thanks