Wrox Home  
Search P2P Archive for: Go

  Return to Index  

sql_language thread: selecting the latest X rows from a table


Message #1 by "Diego Vilar" <diegovilar@g...> on Tue, 8 May 2001 01:30:40 -0300
Diego,

Do you have a date column like creat_date?
if yes, try this:
Select column1, column2 from tablename where latestHeading =3D 'xxx' and
rownum < 6 order by creat_date desc

Hope it works,
Li Li

"Diego Vilar" <diegovilar@g...> wrote:
Hi folks,

Is it possible to select the latest (bottom most) rows (let's say the 5
latest rows) from a table based on a criteria (let's say a date column)?

It's for a news site, and in the main page I only want to show the 5 late
st
headlines..

Thanks in advance,
Diego


  Return to Index