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
How would you go about verifying the network name that the local_listener is currently using?
How to create a stored procedure in oracle?
How to connect asp pages to oracle servers?
What operating systems are supported by oracle database 10g xe?
How do you bind variables in oracle?
Is oracle the best database?
How to create id with auto_increment on oracle?
Differentiate between pre-select and pre-query?
What is the difference between PFILE and SPFILE in Oracle?
How to define an oracle sub procedure?
How to select some rows from a table in oracle?
Explain the truncate in oracle?
How to see the table columns used in an index?
What is the data pump export utility?
How can I create database in oracle?