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
Which data dictionary views have the information on the triggers that are available in the database?
What are all different types of collation sensitivity?
Why do we need cursors in pl sql?
Is sql better than access?
What are reports usually used for?
How do I count duplicates in sql?
What is cte?
Can we declare a column having number data type and its scale is larger than pricesionex: column_name number(10,100),column_name numbaer(10,-84)
Why trigger is used in sql?
What is the use of & in pl sql?
How do I make my sql query run faster?
What is normalisation and its types?
Can one improve the performance of sql*loader? : aql loader
List and explain the different types of join clauses supported in ansi-standard sql?
Is a view faster than a stored procedure?