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 most important ddl statements in sql are?
What are its different types of dbms?
Can we use views in stored procedure?
i have a column which may contain this kind of value: 123*67_80,12*8889_5,34*8_874 ,12*7_7 (can contain space before a comma, and this string length can be anything) now i want to split this value into two column like: column1: 123*67,12*8889,34*8,12*7 column2: 80,5,874,7 use function for this
What are sql injection vulnerabilities?
what is a relationship and what are they? : Sql dba
What is the purpose of the primary key?
Can you have a foreign key without a primary key?
What do you mean by stored procedures? How do we use it?
in oracle 10g sw after compiling procedure how to pass parameter values ,if we (v_empid out number)how to give empid after successful compilation program.This site exact suitable for 10g with respect to question & answer same format , im trying sql browser & sql command prompt using exec procedure name & respective parameters.
Define implicit and explicit cursors.
What is the purpose of cursors in pl/sql?
Does a join table need a primary key?
How is debugging done?
What are different types of sql?