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 / vishnu
create table test100 (id number);
insert into test100
select level from dual connect by level <=100;
select id from (SELECT rownum id from test100) where id
not in (select ID from(select rownum,id from test100) where id!=decode(id,rownum,rownum+1,rownum));
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
How can you fetch first 5 characters of the string?
How do I write a cron which will run a sql query and mail the results to agroup?
What are the triggers associated with image items?
how to load data files into tables with 'mysqlimport'? : Sql dba
What is materialized view in sql?
Can we perform dml on view?
Can we use having without group by in sql?
What type of database is cloud sql?
What are different methods to trace the pl/sql code?
Which column of the user triggers data dictionary view displays the database event that will fire the trigger?
How is use pl and sql?
What is restrict in sql?
what is a database lock ? : Sql dba
Describe different types of general function used in sql?
What are the different tcl commands in sql?