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 memory optimized?
what is self join and what is the requirement of self join? : Sql dba
How do you delete data from a table?
In pl/sql, what is bulk binding, and when/how would it help performance?
What is anonymous block in sql?
How do I run sql?
What is the best free sql database?
what is the difference between where clause and having clause? : Sql dba
What are the two characteristics of a primary key?
What is sql engine in oracle?
i have some prob lem to tell me about my self in interview first round ...
What is t sql in sql server?
How can a function retun more than one value in oracle with proper example?
What is the usage of sql functions?
What is recursive stored procedure?