They say “Necessity is the Power of Invention” - a quote which I fully understood the impact today. I’ve been trying to understand Oracle’s Hierarchical Queries for a while now, but never fully understood the situation under which or when it would be used. Yesterday I got a reason to use it. Let me begin.
Over the period of time that I’ve been working on PL/SQL, the one the thing that we end up doing often is reset the sequences we use for Primary keys in our tables. Why do we do that, you might wonder.
Consider this case: