标签:nbsp 语句 table insert 字段 sel ble from tab
select * into 新表名 from (select * from T1 union all select * from T2)
这个语句可以实现将合并的数据追加到一个新表中。
不合并重复数据 select * from T1 union all select * from T2
合并重复数据 select * from T1 union select * from T2
两个表,表1 表2
如果要将 表1的数据并入表2用以下语句即可
insert into 表2(字段1,字段2) select 字段1,字段2 from b1
注意,必须把字段名全部写清楚,而且不允许把自动编号进去写进去,要合并自动编号字段必须重写一个算法一条一条记录地加进去
1 insert into b1 select * from b2
2 select * into newtable from (select * from b1 union all select * from b2)
标签:nbsp 语句 table insert 字段 sel ble from tab
原文地址:http://www.cnblogs.com/Claire6649/p/6871935.html