34,588
社区成员
发帖
与我相关
我的任务
分享
--同理,如果你想把其它表的资料转移到你创建的这个表中,插入的时候要指定列,避开自增列
insert into tb(aa,bb)
select aa,bb from tbold
--假设你的序号列是 tid,还有其它两列aa,bb,插入的时候
insert into tb(aa,bb)
select 'a1','b1' union all
select 'a2','b2' union all
select 'a3','b4' union all
select 'a5','b4'
--如果字段属性是int,money等这些,可以不用单引号''