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 scalar function in sql?

1044


What is left join in postgresql?

1051


what are the different tables present in mysql? : Sql dba

984


explain the difference between bool, tinyint and bit. : Sql dba

1005


What is a temp table?

1031


Is primary key is clustered index?

1002


How many clustered indexes can you have?

975


Why cannot I use bind variables in ddl/scl statements in dynamic sql?

1211


what is transaction? : Sql dba

1011


How many types of sql are there?

986


What is scalar and vector?

1005


What do you know by pl/sql cursors?

1107


What are the different tcl commands in sql?

1177


What is the best sql course?

988


How many primary keys can a table have?

1009