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

Answer Posted / sudipta santra

delete from
(select * from tab1
minus
select * from tab1 where rownum<n-2 order by rowid)

Is This Answer Correct ?    0 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are three advantages to using sql?

555


Can we call procedure in select statement?

520


How many sectors are in a partition?

564


What are the different types of database management systems?

532


What is package in pl sql with an examples?

551






What is over () in sql?

530


Difference between truncate, delete and drop commands?

559


What are sql built in functions?

510


Why join is faster than subquery?

603


How long does it take to learn pl sql?

610


What is the difference between between and in condition operators?

539


What is the difference between having clause and where clause?

573


What is the difference between inner join and outer join?

534


What does seeding a database mean?

531


How do I sort a table in sql?

599