Given the table T1, created by:
CREATE TABLE t1
(id INTEGER GENERATED BY DEFAULT AS IDENTITY,
c1 CHAR(3)
)
The following SQL statements are issued:
INSERT INTO t1 VALUES (1, 'ABC')
INSERT INTO t1 VALUES (5, 'DEF')
Can anyone tell what is the value that is being inserted into the ID column by the following statement?
INSERT INTO t1(c1) VALUES ('XYZ')?
I knew the answer for this question. It is 1. But can any one explain this.