Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

normally database take to refresh time 2 hours. but client asked iwant to refresh with in 5 min that same database. do you have any option in BO and Oracle? explain me briefly...kavi

2263


what is a Nested Loop join?

2175


Explain the use of owner option in exp command.

1099


Explain the use of full option in exp command.

1175


What is the relation of a user account and a schema?

1174


What is a trigger oracle?

1137


What is object data modeling?

1017


What is the Tune Query

2346


How to enter a new row into a table interactively?

1049


Explain what are the different type of segments?

1003


query optmization techniques and quwry analyser+projects+ppts

2467


How to rollback the current transaction in oracle?

1104


How oracle handles dead locks?

1130


What is Data Dictionary Cache in Oracle?

1243


 What are the oracle DML commands possible through an update strategy?

1103