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 / mani

DECLARE

l_id NUMBER;/* Temp IS TABLE AND ID IS COLOUMN HAVING
Numbers*/

BEGIN

FOR I IN 1..100 LOOP
SELECT COUNT(*) INTO l_id FROM temp WHERE id=I;
IF (l_id = 0) THEN
DBMS_OUTPUT.PUT_LINE(I);
ELSE
NULL;
END IF;
END LOOP;

END;

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How long does it take to learn pl sql?

791


What operators deal with null?

812


Why select is used in sql?

687


What do you understand by pl/sql packages?

764


What are basic techniques of indexing?

1069






What is coalesce in sql?

730


Can we commit in trigger?

697


What is the difference between unique and primary key constraints?

768


Is it important to partition hard disk?

742


Is clustered index a primary key?

688


Explain constraints in sql?

766


What is the use of sqldataadapter?

701


Is it possible to pass parameters to triggers?

776


Write a query to find the names of users that begin with "um" in sql?

701


What is the maximum number of triggers, you can apply on a single table?

730