Subject Re: [firebird-support] Change a PK field from text to autonumber
Author Martijn Tonies
Hello Diego,

update mytable set id = gen_id(mygenerator, 1)

Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, NexusDB, Oracle &
MS SQL Server
Upscene Productions
My thoughts:
Database development questions? Check the forum!

Hy, I need to change the PK in a table from string to numeric.
A crated a new field called "id" and I made a new generator for this

I have about 2k of records in this table. I usually use a code made in
VB to fill this new field with secuential numbers, and after that,
activate the trigger to use the generator.

Because I havenĀ“t much experience in SQL programing, I need for someone
to explain me how I can use a procedure to do that with SQL code.
That is, update avery record of the field with a secuential number for
the field "id".




Visit and click the Resources item
on the main (top) menu. Try Knowledgebase and FAQ links !

Also search the knowledgebases at


Yahoo! Groups Links