how to retrieve last tree records from table?
select *from emp where rownum > (select count(*)-3 from
emp);
i am using this query to get last three records from table
but its not giving any output, so please tell me what is the
error in this query.
Answer Posted / ajit nayak
select *from emp
minus
select *
from emp
where rownum <= (select count(*)-3 from
emp);
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What are expressions?
Which join condition can be specified using on clause?
Can function return multiple values in sql?
What is the difference between drop and truncate commands?
What is range partitioning?
What is gpt format?
What is an index in sql with example?
What is a sql schema used for?
How do I run a sql query in pgadmin 4?
what is single byte over head in oracle..?
How does an execution block start and end in pl sql?
Is primary key always clustered index?
Is sql better than access?
First round ------------------- - Procedure - Packages - Views - Virtual tables - Can we use dcl with in function? - Joins and few scenarios - Triggers and its type - Pragma, type and its functionality - How to create db link in oracle - Materialized view - How to find duplicate values from table? - Cursor and its functionality - Write a script to display friday and its date from a entire year. - Exception Handling Second round ------------------------ Gave a scenario like. Need to write a function to perform. When user try to change a password. It must not be last five password and a given password can be combination of characters, symbols, upper and lower case.
Can you selectively load only those records that you need? : aql loader