查询数据插入别一张表中

                sql查询数据插入别一张表中

第一种方法:

Btable 作为插入数据表,Atable是数据源表,Btable表在插入之前必须存在

insert into Btable select 列1,列2 from Atable 或
insert into Btable(列1,列2...) select 列1,列2... from Atable

第二种方法:

Btable 作为插入数据表,Atable是数据源表,Btable表在查询之前没有存在

select 列1,列2,... into Btable from Table_1 Atable

2013/03/28 20:58:47

 

 

posted @ 2013-03-28 20:59  Blue_Dream  阅读(251)  评论(0)    收藏  举报