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

Answer Posted / aswin

This query cost the performance :
delete from emp where empno in (select empno from (select
empno from emp order by rowid desc) where rownum <= 3)

Is This Answer Correct ?    9 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is data types in sql?

537


Enlist the data types that can be used in pl/sql?

577


What are the different dml commands in sql?

586


What is offset and limit in sql?

555


What does closing a cursor do?

768






what are the advantages and disadvantages of views in a database? : Sql dba

535


What is embedded sql what are its advantages?

507


Is sql procedural language?

554


What is Histogram?

1103


what are the differences between require and include, include_once and require_once? : Sql dba

532


What is the use of desc in sql?

496


What is dbo in sql?

536


Can a key be both primary and foreign?

510


What is pl/sql table? Why is it used?

562


How can we link a sql database to an existing android app?

550