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 scalar and vector?
What is the maximum rows in csv?
What is scope of pl sql developer in future?
What do you understand by pl/sql records?
Define select, insert, create, delete, update, drop keywords
Explain about various levels of constraint.
What are packages in pl sql and also explain its advantages?
What is data profiling in sql?
What is a sql statement?
Why do we use sql constraints? Which constraints we can use while creating database in sql?
Does sql backup shrink transaction log?
how to use regular expression in pattern match conditions? : Sql dba
what are the difference between clustered and a non-clustered index? : Sql dba
What kind of join is join?
How do I start sql profiler?