Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is on delete set null?

1038


How to use sql statements in pl/sql?

1053


what are the differences between public, private, protected, static, transient, final and volatile? : Sql dba

975


Can I join the same table twice?

994


What is record variable?

923


What is the current version of sql?

973


Is hadoop a nosql?

949


What is varchar data type in sql?

1011


what are the differences among rownum, rank and dense_rank? : Sql dba

982


What is consistency?

1061


What is cursor and its types?

995


How many aggregate functions are available there in sql?

929


Explain isolation levels. : Transact sql

1015


What are the two types of periodical indexes?

886


How do I create a sql script?

1050