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
How to test for null values?
what is the difference between undefined value and null value? : Sql dba
How to fetch values from testtable1 that are not in testtable2 without using not keyword?
What is a data definition language?
What is an invalid partition table?
What is latest version of sql?
How much does a sql dba make? : SQL DBA
how to drop an existing table in mysql? : Sql dba
What is the difference between local and global temporary table?
How does stored procedure reduce network traffic?
Why primary key is required?
How would you convert date into julian date format?
The in operator may be used if you know the exact value you want to return for at least one of the columns.
what is oltp (online transaction processing)? : Sql dba
How to raise user-defined exception with custom sqlerrm ?