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 the function of optimizer in oracle?
How to use "out" parameter properly?
What are the different types of trigger and explain its various uses and functions?
Explain what does a control file contain?
How to create a new table in your schema?
Explain what are the different type of segments?
What is the difference between substr & instr functions?
What is hot backup and logical backup?
Can a formula column be obtained through a select statement ?
What happens if you lost a data file?
Is oracle a relational database?
How to define a variable to match a table column data type?
What are the different types of record groups in oracle? Explain each of them
In XIR2 if we lost the administration password .How can we regain the password?thanks in advance.
What is control file used for?