类似decode的转码操作
oracle中有一个函数select decode(a1,'1','n1','2','n2','n3') aa1 from
db2没有该函数,但可以用变通的方法
select case a1
when '1' then 'n1'
when '2' then 'n2'
else 'n3'
end as aa1 from
创建含identity值(即自动生成的ID)的表
建这样的表的写法
CREATE TABLE test 字串7
(t1 SMALLINT NOT NULL
GENERATED ALWAYS AS IDENTITY
(START WITH 500, INCREMENT BY 1),
t2 CHAR(1));
在一个表中只允许有一个identity的column.