Subject How to populate a new table column with a INTEGER sequence?


I'm asking for some help for changing the primary key of a table that has more than 1000000 records.

The idea is to create a new INTEGER column that will contain a generated sequence by combining a generator and a trigger that is going to be the primary key.

So I have to get this goal: Once created the new INTEGER column, I must populate all records with the sequence of numbers before adding the constraint for defining the primary key.

Is there any SQL comand that I can run for doing this. Maibe a stored procedure or Firebird function?

Any help will be appreciated.