Hi
I have come into an organisation where all the tables are in a real mess. I would like to start creating primary keys for some tables but am a little stuck on how to cater for existing data.
The triggers and sequences part is no problem. I have created a column called autonumber and now need to populate the existing rows with an incrementing number. I presume a cursor is the way forward but could somebody give me an example please. The table does contain duplicates.
Thank you in advance
I have come into an organisation where all the tables are in a real mess. I would like to start creating primary keys for some tables but am a little stuck on how to cater for existing data.
The triggers and sequences part is no problem. I have created a column called autonumber and now need to populate the existing rows with an incrementing number. I presume a cursor is the way forward but could somebody give me an example please. The table does contain duplicates.
Thank you in advance