Generator x Sequence in Firebird

Asked

Viewed 91 times

2

When to use Generator and how much to use Sequence in Firebird?

What difference between the two?

There is a difference in performance?

1 answer

4


It’s exactly the same. GENERATOR was the old syntax that is still accepted, but should be preferred SEQUENCE which is more SQL standard.

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

Documentation.

In 3.0 it is possible to use a new type that we can call IDENTITY that makes the whole process automatically.

  • But I still need to create a Rigger?

  • Yes, you do. Only in 3.0 is there another type of column that automates the whole process.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.