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
Describe different types of general function used in sql?
What is the use of triggers?
Explain how to use transactions efficiently : transact sql
Is primary key always clustered index?
Can you do multiple joins in sql?
What is the difference between rename and alias?
How many types of cursors are available in pl/sql?
How to load data with sql*loader?
What is on delete restrict?
What is a schema sql?
What are the disadvantages of not performing database normalization?
What are the types of dbms?
What is coalesce sql?
What are system versioned tables?
What is sql architecture?