Tuesday, March 23, 2010

Select top 10 records in Oracle

Microsoft TSQL has select top records statement. How do you do it in Oracle PL/SQL?

TSQL:
select top(10) from tblStudents

PL/SQL:
select * from
(select IDStudent, FirstName, LAstName from tblStudents)
where rownum <10

No comments: