Quantcast
Channel: Software Applications Programming Errors and solutions.
Viewing all articles
Browse latest Browse all 277

How to get Last 10 records from SQL table

$
0
0
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

Viewing all articles
Browse latest Browse all 277

Trending Articles