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

What is bind variable in pl sql?

522


What is synchronized subquery?

591


What is pivot in sql?

510


Differentiate between pl/sql and sql?

613


discuss about myisam key cache. : Sql dba

561






What is the difference between microsoft access and sql?

496


what is the difference between undefined value and null value? : Sql dba

560


What is cursor in pl sql with examples?

477


How do I view tables in sql developer?

510


What is a mutating table and a constraining table?

567


what are wild cards used in database for pattern matching ? : Sql dba

544


How to create your own reports in sql developer?

536


what happens if null values are involved in expressions? : Sql dba

563


Can primary key be changed?

527


What are data types in pl sql?

558