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 / subrat ray
SQL> desc numtab;
Name Null? Type
------ ------- ------
X NUMBER(4)
declare
v_num number(2);
cursor c1 is select rownum num from all_tables where rownum<=100
minus
select x num from numtab;
begin
open c1;
loop
fetch c1 into v_num;
exit when c1%notfound;
dbms_output.put_line(v_num);
end loop;
close c1;
end;
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
Explain commit, rollback and savepoint.
Why do we use cursors?
Why use truncate instead of delete?
What is set transaction?
How do I run a pl sql procedure in sql developer?
What is use of trigger?
What is the sql*loader? : aql loader
What are the basic sql commands?
What are commit, rollback, and savepoint?
What is cte?
Do prepared statements prevent sql injection?
How long it takes to learn pl sql?
How does one use sql*loader to load images, sound clips and documents? : aql loader
What do we need to check in database testing?
What is sql lookup?