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 / sanjay
SELECT ROWNUM AS rank, employee_id
FROM (SELECT employee_id
FROM employees
ORDER BY employee_id DESC)
WHERE ROWNUM<=3
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
What is the process of debugging?
What is varchar sql?
What is not equal in sql?
What is a primary key? Explain
What does a pl/sql package consist of?
Does sqlite need a server?
Enlist the advantages of sql.
What is identity column in sql server?
How to execute a stored procedure?
Lookups are a key component in sql server integration services (ssis). Explain its purpose?
How is debugging done?
What is serial sql?
How do I view tables in mysql?
What is parallel hint?
Is nosql relational?