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

What is difference between group by and partition by?

492


Could you please provide oca (oracle 10g) dumps for my certification ?

4506


Can you skip header records while loading? : aql loader

537


What is sql in java?

543


How do I run sql profiler?

582






Does truncate need commit?

512


How do you write a complex sql query?

583


What if we write return in procedure?

785


What is multiple columns?

571


How do I find sql profiler?

512


How do you respond to dementia behavior?

527


What is the limitation on the block size of pl/sql?

527


What is a primary key sql?

559


What does trigger mean in psychology?

532


what are the different index configurations a table can have? : Sql dba

566