mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-22 17:23:03 +01:00
Improvement CORE-4206 - Add RESTART [WITH] clause for alter identity columns - documentation.
This commit is contained in:
parent
eae91e94a9
commit
b0595b76aa
@ -13,6 +13,9 @@ Syntax:
|
||||
<column definition> ::=
|
||||
<name> <type> GENERATED BY DEFAULT AS IDENTITY [ (START WITH <value>) ] <constraints>
|
||||
|
||||
<alter column definition> ::=
|
||||
<name> RESTART [ WITH <value> ]
|
||||
|
||||
Syntax rules:
|
||||
- The type of an identity column must be an exact number type with zero scale. That includes:
|
||||
smallint, integer, bigint, numeric(x, 0) and decimal(x, 0).
|
||||
@ -42,10 +45,26 @@ insert into objects (name) values ('Table');
|
||||
insert into objects (name) values ('Book');
|
||||
insert into objects (id, name) values (10, 'Computer');
|
||||
|
||||
select * from objects;
|
||||
select * from objects order by id;
|
||||
|
||||
commit;
|
||||
|
||||
ID NAME
|
||||
============ ===============
|
||||
1 Table
|
||||
2 Book
|
||||
10 Computer
|
||||
|
||||
alter table objects
|
||||
alter id restart with 14;
|
||||
|
||||
insert into objects (name) values ('Pencil');
|
||||
|
||||
select * from objects order by id;
|
||||
|
||||
ID NAME
|
||||
============ ===============
|
||||
1 Table
|
||||
2 Book
|
||||
10 Computer
|
||||
15 Pencil
|
||||
|
Loading…
Reference in New Issue
Block a user