New and Enhanced Syntaxes
The following statement syntaxes and structures have been added to Firebird 2:
CREATE SEQUENCE
D. Yemanov
SEQUENCE has been introduced as a synonym for GENERATOR, in accordance with SQL-99. SEQUENCE
is a syntax term described in the SQL specification, whereas GENERATOR is a legacy InterBase syntax term.
Use of the standard SEQUENCE syntax in your applications is recommended.
A sequence generator is a mechanism for generating successive exact numeric values, one at a time. A sequence
generator is a named schema object. In dialect 3 it is a BIGINT, in dialect 1 it is an INTEGER.
Syntax patterns
CREATE { SEQUENCE | GENERATOR } <name>
DROP { SEQUENCE | GENERATOR } <name>
SET GENERATOR <name> TO <start_value>
ALTER SEQUENCE <name> RESTART WITH <start_value>
GEN_ID (<name>, <increment_value>)
NEXT VALUE FOR <name>
Examples
1.
CREATE SEQUENCE S_EMPLOYEE;
2.
ALTER SEQUENCE S_EMPLOYEE RESTART WITH 0;
See also the notes about NEXT VALUE FOR.
Warning
ALTER SEQUENCE, like SET GENERATOR, is a good way to screw up the generation of key values!
arkadaşlar fb 2.0.3 de SEQUENCE olayı anladığım kadarıyla daha önce otomatik artan alanlar konusunda attığımız taklaları atmayacaz anlamınamı geliyor...
Bir mum, yanındaki mumları tutuşturmakla,
ışığında hiç bir şey kaybetmez. Mevlana
OS win.10, IDE Delphi 10.3, RDBMS Firebird and MSSQL, BROWSER Chrome
Evet, bu sadece aynı işi yapan SQL-99 standartlarını sağlamak için eklenmiş yeni bir yazım şekli. Aynı işi yapıyor.
Bu arada otomatik artan alanlar noktasında ne taklası atıyorsunuz : ) Generator olayı basit ve kullanışlı bir olay. Hem delphi tarafından, hem de Firebird tarafından kolayca kullanabiliyorsunuz.