You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is it a trivial change to enable conversion of an integer type column that is populated from a generator from a trigger to IDENTITY type?
Example
------------
create generator id_gen_idtest;
create table idtest (id integer not null, data varchar(10);
commit;
set term ^;
create trigger get_id_idtest for idtest
active before insert as
begin
if (http://new.id is null) then http://new.id = next value for id_gen;
end ^
set term ;^
commit;
insert into idtest (data) values ('first');
insert into idtest (data) values ('second');
insert into idtest (data) values ('third');
insert into idtest (data) values ('fourth');
commit;
Make this possible without the need to remove dependencies:
alter table idtest
alter column id type integer generated by default as IDENTITY (start with 5);
-- not forgetting to
drop trigger get_id_idtest;
commit;
The text was updated successfully, but these errors were encountered:
Submitted by: @helebor
Is it a trivial change to enable conversion of an integer type column that is populated from a generator from a trigger to IDENTITY type?
Example
------------
create generator id_gen_idtest;
create table idtest (id integer not null, data varchar(10);
commit;
set term ^;
create trigger get_id_idtest for idtest
active before insert as
begin
if (http://new.id is null) then http://new.id = next value for id_gen;
end ^
set term ;^
commit;
insert into idtest (data) values ('first');
insert into idtest (data) values ('second');
insert into idtest (data) values ('third');
insert into idtest (data) values ('fourth');
commit;
Make this possible without the need to remove dependencies:
alter table idtest
alter column id type integer generated by default as IDENTITY (start with 5);
-- not forgetting to
drop trigger get_id_idtest;
commit;
The text was updated successfully, but these errors were encountered: