How do you retrieve the last N records from a table?
Answer Posted / kiran penujuri
This Will give you last 10 records from a table
SELECT EMPNAME,SALARY
FROM
(SELECT EMPNAME,
SALARY,
RANK() OVER(ORDER BY SALARY) SAL_RANK
FROM EMP)
WHERE SAL_RANK < = 10
| Is This Answer Correct ? | 1 Yes | 5 No |
Post New Answer View All Answers
What is left join in sql?
what are integrity rules?
How do I partition in sql?
What type of join is sql join?
Can we create index on primary key?
Does asenumerable execute the query?
What mean sql?
Explain normalization and what are the advantages of it?
What is integrity in sql?
Can we join two tables without common column?
What are the types of variable use in pl sql?
How do I view tables in sql developer?
What operators deal with null?
Which data type is a composite type?
What are the different types of tables in sql?