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 difference between left and right outer join?

722


Explain how can you save or place your msg in a table?

775


Explain 3 basic parts of a trigger.

1037


what are the differences between char and varchar? : Sql dba

748


What is localdb mssqllocaldb?

803






What are character functions?

804


How many tables can a sql database have?

710


How do I truncate a sql log file?

741


How do I debug a stored procedure?

812


What is consistency?

886


What is the need of merge statement?

764


What is the best sql course?

720


what is the difference between rownum pseudo column and row_number() function? : Sql dba

810


What does the hierarchical profiler does?

755


How can you load microsoft excel data into oracle? : aql loader

813