DB2通过数据库的序列,生成订单号

select replace(char(current_date),'-','') || right(digits(序列名.nextval),8) from (values 1)


right(digits(序列名.nextval),8)  ,右补齐,总长度8位

猜你喜欢

转载自blog.csdn.net/liuao107329/article/details/79240313