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 the command line end user interface - mysql? : Sql dba

1031


How do I run a sql query in pgadmin 4?

1002


Can function return multiple values in sql?

1099


What are the types of optimization?

1009


name 3 ways to get an accurate count of the number of records in a table? : Sql dba

1116


Why trigger is used in sql?

1017


Why do we use joins in sql?

1009


What is mdf ldf and ndf?

1060


What is blind sql injection?

1169


Why is pl sql used?

1030


Is primary key is clustered index?

1045


What is the mutating table and constraining table?

1084


What are inner and outer joins examples of both?

1010


Mention what is the use of function "module procedure" in pl/sql?

1090


Explain the savepoint statement.

1138