select emp.*, rownum
from emp
where rownum between 1 and 3
order by empno desc
/
Please take a few minutes to provide feedback on the quality of service you received from our staff. The Department of Education values your feedback as a customer. Commissioner of Education Jeanine Blomberg is committed to continuously assessing and improving the level and quality of services provided to you.Simply use the link below. Thank you in advance for completing the survey.
http://data.fldoe.org/cs/default.cfm?staff=Ed.[Email address protected]
-----Original Message-----
From: Balvinder Singh
[mailto:oracledba-ezmlmshield-x67905289.[Email address protected]
Sent: Tuesday, October 09, 2007 4:21 AM
To: LazyDBA Discussion
Subject: Retreving last n records
Hi,
Pls suggest a query that How can I retrieve a last three
transactions/records on the basis of BILLDATE?
TOTALAMOUNT BILLDATE DUEDATE
------------ --------- ---------
352 05-FEB-06 24-FEB-06
293 05-APR-06 26-APR-06
376 05-JUN-06 26-JUN-06
453 05-OCT-06 25-OCT-06
368 05-DEC-06 26-DEC-06
367 05-JAN-07 26-JAN-07
519 05-FEB-07 26-FEB-07
I want to retrieve the last 3 bills from the above records.
regards
---------------------------------------------------------------------
TO REPLY TO EVERYBODY , PLEASE CLICK REPLY-ALL, NOT JUST REPLY
To post a dba job: http://jobs.lazydba.com
To Subscribe : http://www.LazyDBA.com
To unsubscribe: http://www.lazydba.com/unsubscribe.html
Oracle LazyDBA home page