Subject | RE: [firebird-support] Firebird record number |
---|---|
Author | Alan McDonald |
Post date | 2006-11-27T12:59:44Z |
> i want to add a field in a table that contains the record number of theadd a generator
> 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 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