How can we manage the gap in a primary key column created
by a sequence?
Ex:a company has empno as primary key generated by a
sequence and some employees leaves in between.What is the
best way to manage this gap?
Answer Posted / poornima
using cursor we find the gap in sequence, but this method
is quite complicated and slow process...
so we use some analyical fuctions such as lead and lag as
{LEAD | LAG} (value_expression, offset, default)
OVER ([PARTITION BY expr] ORDER BY expr)
| Is This Answer Correct ? | 5 Yes | 0 No |
Post New Answer View All Answers
Explain about your project and its relation to the current job position you are applying to?
20. Using a set operator, display the client number of all clients who have never placed an order.
What is the difference between 10g OEM and 11g OEM?
What is the maximum limit on the number of columns in a table?
What are named parameters?
how to make an oracle object
How would you change old and new values in an insert, delete and update triggers?
Explain what are synonyms used for?
What privilege is needed for a user to delete rows from tables in another schema?
How would you best determine why your MVIEW couldnt FAST REFRESH?
What is a subquery?
What is oracle open database communication (odbc)?
what is dynamic SGA and static SGA
What is ordinary table in oracle?
Why do we use bulk collect in oracle?