6 Replies Latest reply: Mar 4, 2009 4:02 PM by 689144 RSS

    Adding an id column to an existing table

      I would like to add an id column to an existing table and populate this column for the existing records. For any new inserts I would like to use the next id in sequence.

      I believe a sequence and a trigger on insert would be the best way to accomplish the second requirement. I would like to know how to do the first, i.e. handle the existing rows given that I will be using a sequence and trigger for all subsequent rows.

      I've never created sequences or triggers before so any advice would be appreciated.