Generator x Sequence in Firebird

2

When using Generator and how much do you use Sequence in Firebird?

What is the difference between the two?

Is there a performance difference?

    
asked by anonymous 03.10.2016 / 02:56

1 answer

4
It's exactly the same thing. GENERATOR was the old syntax that is still accepted, but it should be preferred SEQUENCE which is more default.

This feature is used to create unique and sequential identity for rows, often used in column as the primary key, where ID is the most common name. In most cases it acts as a substitute key. The largest possible number is 2 raised to 64.

Documentation .

No 3.0 can be used a new type that we can call IDENTITY that does the whole process automatically.

    
03.10.2016 / 03:14