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 the difference between having clause and where clause?
what are the limitations of mysql in comparison of oracle? Mysql vs. Oracle. : Sql dba
What is difference between mysql and postgresql?
Is ms sql traffic encrypted?
How to add a column ‘salary’ to a table employee_details?
How do you bind variables in pl sql?
Can we use pl sql in sql server?
Why do we need pl sql?
What is rownum in sql?
What are the different types of sql commands?
what are numeric data types? : Sql dba
How does one use sql*loader to load images, sound clips and documents? : aql loader
What is trigger in sql? Explain
differentiate between float and double. : Sql dba
Is sql a dbms?