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 / vishnu
create table test100 (id number);
insert into test100
select level from dual connect by level <=100;
select id from (SELECT rownum id from test100) where id
not in (select ID from(select rownum,id from test100) where id!=decode(id,rownum,rownum+1,rownum));
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is on delete set null?
How to use sql statements in pl/sql?
what are the differences between public, private, protected, static, transient, final and volatile? : Sql dba
Can I join the same table twice?
What is record variable?
What is the current version of sql?
Is hadoop a nosql?
What is varchar data type in sql?
what are the differences among rownum, rank and dense_rank? : Sql dba
What is consistency?
What is cursor and its types?
How many aggregate functions are available there in sql?
Explain isolation levels. : Transact sql
What are the two types of periodical indexes?
How do I create a sql script?