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
Can you join views in sql?
What is a unique key and primary key and foreign key?
Can we rollback after truncate?
How can we store rows in PL/SQL using array?
what is timestamp in mysql? : Sql dba
how to dump a table to a file with 'mysqldump'? : Sql dba
What is a trigger in sql?
How can I tell if sql is running?
What are % type and % rowtype?
Can triggers stop a dml statement from executing on a table?
What is pl sql architecture?
Why do we use procedures?
What is sql server and ase?
What is indexing in sql and its types?
What is sql entity?