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 the difference between delete and truncate commands? : Sql dba
How do you update f as m and m as f from the below table testtable?
how to drop an existing index in mysql? : Sql dba
What is a subquery in sql?
What are the ddl commands?
How insert into statements in sql?
Why is sharding used?
What normalization means?
how to fetch common records from two tables? : Sql dba
What are different types of queries in sql?
Can we call dml statement in function?
What are the different operators available in sql?
How do I remove sql developer from windows 10?
What is a data definition language?
Why is the cursor important?