一个数据库插入关于序号问题?
table 1
itemno sono procno gg unit
table2
procno gg unit
s100054 a 个
s10566 B 千克
s10652 s 包
K455S U 个
Y48582 YY 个
我想把数据表TABLE2中的数据插入到TABLE1中去。
insert into table1 (procno,gg,unit)
select procno,gg,unit from table2 where procno like 's%'
我想插入数据后,TABLE1中ITEMNO字段能够自动添加顺序的编号,怎么实现?
我希望的结果是:
table 1
itemno sono procno gg unit
1 null s100054 a 个
2 null s10566 B 千克
3 null s10652 s 包