Subject | Autonumeric columns |
---|---|
Author | Flores José |
Post date | 2004-10-19T16:32:43Z |
Hello,
I'm moving to Firebird
At MS SQL i have an option to create autonumeric columns
With this: IDENTITY (seed, increment )
Where seed
Is the value that is used for the very first row loaded into the table.
increment
Is the incremental value that is added to the identity value of the previous
row that was loaded.
http://doc.ddart.net/mssql/sql70/create_7.htm
<http://doc.ddart.net/mssql/sql70/create_7.htm>
CREATE TABLE myTable (EmployeeID int IDENTITY (1,1) not null primary key,
EmployeeName varchar(50))
INSERT myTable (EmployeeName) values ('Employee one')
INSERT myTable (EmployeeName) values ('Employee two')
When I do: SELECT * FROM myTable
I obtain
EmployeeID EmployeeName
------------- ------------------
1 Employee one
2 Employee two
....
How can I do the same with Firebird?
Thank you.
José Flores
[Non-text portions of this message have been removed]
I'm moving to Firebird
At MS SQL i have an option to create autonumeric columns
With this: IDENTITY (seed, increment )
Where seed
Is the value that is used for the very first row loaded into the table.
increment
Is the incremental value that is added to the identity value of the previous
row that was loaded.
http://doc.ddart.net/mssql/sql70/create_7.htm
<http://doc.ddart.net/mssql/sql70/create_7.htm>
CREATE TABLE myTable (EmployeeID int IDENTITY (1,1) not null primary key,
EmployeeName varchar(50))
INSERT myTable (EmployeeName) values ('Employee one')
INSERT myTable (EmployeeName) values ('Employee two')
When I do: SELECT * FROM myTable
I obtain
EmployeeID EmployeeName
------------- ------------------
1 Employee one
2 Employee two
....
How can I do the same with Firebird?
Thank you.
José Flores
[Non-text portions of this message have been removed]