how will you find out the last three records in a table
with n no of records and delete them

Answer Posted / ajit

delete from emp
where empno in
(select empno
from emp
minus
select empno
from emp
where rownum <= ( select count(*) - 3
from emp
))

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a nested table in word?

705


How to convert comma separated string to array in pl/sql?

812


How many types of triggers are there in pl sql?

784


How do you write an inner join query?

694


what is the difference between a having clause and a where clause? : Sql dba

693






Is delete faster than truncate?

753


How do I access sql anywhere database?

675


How to read/write files from pl/sql?

774


How do I copy a table in sql?

696


What are packages in pl sql and also explain its advantages?

712


What is package in pl sql?

738


Are sql database names case sensitive?

687


Why do we use joins?

777


What are synonyms in sql?

731


Can you skip header records while loading? : aql loader

735