To get Last 10 records from SQL table you can get idea from below example. You can try that by rounum condition.
select * from emp minus select * from emp where rownum<=(select count(*)-10 from emp);
or you can try this also.
select * from (
select * from emp
order by empno desc) where rownum<=10
select * from emp minus select * from emp where rownum<=(select count(*)-10 from emp);
or you can try this also.
select * from (
select * from emp
order by empno desc) where rownum<=10
Comments
Post a Comment
Please avoid link comments