I have a query related to database as I want to display the rows of the table except last 2 rows? Can anyone from you guys help me to do so? Please help me if you can?
Thanks in Advance
Comments
Sugandh |
| 24 Aug 2015 6:18 pm
You need to select * from emp where rowid <(select max(rowid) from emp where rowid <>(select max(rowid) from emp) ); ---->this is my view.
Sugandh |
| 24 Aug 2015 6:18 pm
select * from (select rownum r,emp.* from emp ) where r<=(select max(rownum)-&n from emp); this is for except of any no. of last rows.
Abhijeet Mudgal |
| 24 Aug 2015 6:18 pm
Select * from emp where rownum <=(( select count(*) from emp) -2)
You need to select * from emp where rowid <(select max(rowid) from emp where rowid <>(select max(rowid) from emp) ); ---->this is my view.