CREATE TABLE t4(c1 int generated always as identity,c_desc char(20));
-- Below insert would fail
Insert into t4 values ( 1,'A');
Because the c1 is defined generated always as identity, therefore we can not specify the value in the insert statement. Below insert would work.
insert into t4(c_desc) values( 'B')
CREATE TABLE t5(c1 int generated by default as identity,c_desc char(20));
Insert into t5 values ( 1,'A');
select * from t5;
0 comments:
Post a Comment