Subject RE: [firebird-support] Firebird record number
Author Alan McDonald
> i want to add a field in a table that contains the record number of the
> line.
> this field will be the key field because my data are so bad without
> unique key.
> so the idea is to create a field then update the field with rownumber
> for each row.
> thanks
> julien
> Martijn Tonies a écrit :

add a generator
add the integer field as your key field, then
UPDATE MYTABLE SET MYKEYFIELD=GEN_ID(MYGENERATOR,1);
Then you can turn the field into a PK
Alan