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 / 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


Please Help Members By Posting Answers For Below Questions

What is Materialized View? In What Scenario we Use Materialized View?

9482


What is sql*loader?

1150


What is nvl?

1051


What is difference between pl and sql?

1031


Is clustered index a primary key?

930


What is server name sql?

1120


what is clause? : Sql dba

1046


Can we delete column in sql?

1075


what are all different types of collation sensitivity? : Sql dba

964


What is the starting oracle error number?

1035


Are left and right joins the same?

1049


What is sqlerrm?

916


How do I run a sql script?

1114


how many values can the set function of mysql take? : Sql dba

967


How many row comparison operators are used while working with a subquery?

1015