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 are local and global Indexes and where they are useful.
What is normalization in a database?
Can we create clustered index without primary key?
Explain dml and ddl?
How do I view stored procedures?
What is pragma in pl sql?
What are the different types of a subquery?
If i can use sys.check_constraints to display my constraints from my database using sql server 2005, how can i display then if i am using sql server 2000????
How exception is different from error?
what is union, minus and interact commands? : Sql dba
What is meant by temporal data?
What is memory optimized table?
What is the clause we need to add in function body to return variable?
What is identity column in sql server?
Is sqlite free?