insert 表1
select * from 表2

解决方案 »

  1.   

    insert 表1(a,b,c)
    select a,b,c from 表2
      

  2.   

    创建 INSERT INTO 查询
    可以使用 INSERT INTO 查询在当前表中创建新行。创建 INSERT INTO 查询时指定: 将行添加到的数据库表。
    要添加内容的列。
    将要插入到单个列中的值或表达式。 
    例如,下面的查询将一行添加到 titles 表中,以指定书名、类型、出版商及价格的值:INSERT INTO titles
             (title_id, title, type, pub_id, price)
    VALUES   ('BU9876', 'Creating Web Pages', 'business', '1389', '29.99')
    当创建 INSERT INTO 查询时,网格窗格将更改以反映仅可用于插入新行的选项:要插入的列名和值。
      

  3.   

    insert 表1(a,b,c)
    select a,b,c from 表2
      

  4.   

    如果列一样:insert 表1 select * from 表2
      

  5.   

    如果表结构完全相同,则
    insert into tab1 select * from tab2
    否则
    insert into tab1 (col1,col2...)
    selet(col1,col2...) from tab2