Firebird support for Identity Columns in 3.0

An identity column is a column associated with an internal sequence generator and has it value automatically set when omitted in an INSERT statement.

Example:

create table objects (
id integer generated by default as identity primary key,
name varchar(15)
);

insert into objects (name) values (‘Table’);
insert into objects (name) values (‘Book’);
insert into objects (id, name) values (10, ‘Computer’);

select * from objects;

ID NAME
============ ===============
1 Table
2 Book
10 Computer

1 Star2 Stars3 Stars4 Stars5 Stars (7 votes, average: 5.00 out of 5)
Loading...

One comment

  • That’s a nice news!

    MySQL has “AUTO_INCREMENT” and PostgreSQL has “SERIAL” with columns syntax, only Firebird has no feature.

    We had to create generator and trigger differently…, like oracle.

Leave a Reply