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 are the different tcl commands in sql?

1171


How many triggers can be applied to a table?

1056


what does it mean to have quoted_identifier on? : Sql dba

1142


What action do you have to perform before retrieving data from the next result set of a stored procedure ?

2564


What are all ddl commands?

1080


What is scalar data type in pl sql?

1066


What is crud sql?

976


What are packages in pl sql and also explain its advantages?

1027


What is difference between mysql and postgresql?

1145


What is application trigger?

990


what are local and global variables and their differences? : Sql dba

1069


how to create a new view in mysql? : Sql dba

928


How to find 3rd highest salary of an employee from the employee table in sql?

1079


What is normalisation in sql?

1049


What are the two characteristics of a primary key?

969