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

suppose we have values like 1 5 7 in a colum.Now we want
numbers like(2 3 4 6) that exists between 1 5 7.How can we
do this using sql query??

Answer Posted / kavitha n

Create Table Missingsquence ( Num Number);

sql > select Num from Missingsquence ;

Missingsquence
--------------
1
5
7

SELECT LEVEL num
FROM DUAL
CONNECT BY LEVEL <= 7
MINUS
SELECT num
FROM missingsquence;

Is This Answer Correct ?    7 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is single byte over head in oracle..?

2412


What does := mean in pl sql?

1052


Is pl sql a scripting language?

1041


How do you take the union of two tables in sql?

996


How to read xml file in oracle pl sql?

921


how to start mysql server? : Sql dba

1212


what is a constraint? : Sql dba

1186


Explain lock escalation? : Transact sql

1212


Explain what is dbms?

1071


What is foreign key and example?

942


What is a constraint? Tell me about its various levels.

1178


write an sql query to get third maximum salary of an employee from a table named employee_table. : Sql dba

980


Can we use joins in subquery?

1173


Are sql connections encrypted?

1038


Why is partition used in sql?

1131