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 / ravi kumar singh
DECLARE
RETVAL NUMBER:=0;/*A_CHK IS TABLE AND A IS COLOUMN HAVING NOS*/
I NUMBER:=0;
BEGIN
FOR I IN 1..100
LOOP
SELECT COUNT(*) INTO RETVAL FROM A_CHK WHERE A=I;
IF (RETVAL=0) THEN
DBMS_OUTPUT.PUT_LINE(I);
ELSE NULL;
END IF;
END LOOP;
END;
| Is This Answer Correct ? | 15 Yes | 0 No |
Post New Answer View All Answers
What are pl sql data types?
What is the use of index in sql?
What is a rank in sql?
what is the syntax used for partition in tsql? : Transact sql
What is the difference between delete and truncate statement in sql?
What is a nested table in word?
What is sorting in sql?
What is the difference between truncate and drop statements?
What is rename command in sql?
How do you declare a variable in pl sql?
How do you use join?
What are the types of dbms?
what are the advantages a stored procedure? : Sql dba
How can you save or place your msg in a table?
What is the difference between function and procedure in pl/sql?