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
What is bind variable in pl sql?
What is synchronized subquery?
What is pivot in sql?
Differentiate between pl/sql and sql?
discuss about myisam key cache. : Sql dba
What is the difference between microsoft access and sql?
what is the difference between undefined value and null value? : Sql dba
What is cursor in pl sql with examples?
How do I view tables in sql developer?
What is a mutating table and a constraining table?
what are wild cards used in database for pattern matching ? : Sql dba
How to create your own reports in sql developer?
what happens if null values are involved in expressions? : Sql dba
Can primary key be changed?
What are data types in pl sql?