怎么样把一个表中的数据取出来放到另一个表中? 用一条语句

解决方案 »

  1.   

    insert into 表2(...) select ... from 表1 where ...
      

  2.   

    insert Newtable(col1,col2,...) select col1,col2,.... from oldtable
    or
    select * into newtable from oldtable========================================
    http://www.dbtuning.cn
    主营:中小企业数据库管理、优化、调校服务
    ========================================
      

  3.   

    "另一表"若不存在select * into 另一表 from 一个表"另一表"若已存在insert 另一表(字段列表) select 字段列表 from 一个表
      

  4.   

    inisrt into Ta Select * From Tb
      

  5.   

    已知表Table1。现将Table1的数据放入Table2中。
    1:Table2已经存在
    insert Table2 select 字段列表 from Table1
    2:Table2不存在
    select * into Table2 from Table1
      

  6.   

    1.表存在insert into tb1(...) select ... from tb22.表不存在
    select ... into tb1 from tb23.两表根据关联字段更改数据.update tb1 set col = tb2.col from tb1 , tb2 where tb1.id = tb2.id