how to retrieve last tree records from table?
select *from emp where rownum > (select count(*)-3 from
emp);
i am using this query to get last three records from table
but its not giving any output, so please tell me what is the
error in this query.
Answer Posted / arvind kumar
select * from employees minus select * from employees where
rownum < (select count(*)-2 from employees);
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is normalisation in sql?
Can ddl statements be used in pl/sql?
Can we use rowid as primary key?
what is the functionality of the function htmlentities? : Sql dba
What are sql data types?
What are all the common sql functions?
Explain the advantages and disadvantages of stored procedure?
what is online transaction processing (oltp)? : Sql dba
What are the topics in pl sql?
what is msql? : Sql dba
What is the purpose of normalization?
Are stored procedures faster than queries?
Is sqlite good enough for production?
What is the best partition size for windows 10?
Is sql developer case sensitive?