If there are 1 to 100 numbers in a table and in that 100
numbers some 10 numbers are deleted.I want to find out the
missing numbers between 1 to 100 by pl/sql how?

Answer Posted / kavitha n

BEGIN

FOR DATA IN (SELECT LEVEL num
FROM DUAL
CONNECT BY LEVEL <= 100
MINUS
SELECT num
FROM missingsquence)
LOOP
exit when sql%notfound;

DBMS_OUTPUT.put_line (DATA.num);
END LOOP;
END;
/

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How many joins can you have in sql?

685


hi,i plan to put experience on PLSQL ,can anyone suggest me for any institutes in bangalore or how to prepare for interviews

1740


what are the difference between clustered and a non-clustered index? : Sql dba

731


Can we insert in view in sql?

774


How do I run pl sql in sql developer?

850






Difference between truncate, delete and drop commands?

730


Why do we need unique key in a table?

673


what is myisam? : Sql dba

755


List out the acid properties and explain?

709


What is foreign key sql?

743


How many clustered indexes can you have?

726


What version is sql?

727


What is the difference between python and sql?

703


what are the security recommendations while using mysql? : Sql dba

764


How does rowid help in running a query faster?

1155