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
How does a covering index work?
Define tables and fields in a database
How do I view stored procedures?
What are the different sql languages?
Is clustered index a primary key?
Explain the select statement in sql?
What is character functions?
What is a trigger word?
What is the difference between delete, truncate and drop command?
What is the difference between syntax error and runtime error?
What is a table partition?
What are stored procedures in mysql?
Explain architecture of sql server notification services?
What are analytic functions in sql?
How do you concatenate in sql?