各位大哥??
如何将一张表中的所有数据插入的另一张表中?
那一种解决方法更好点?

解决方案 »

  1.   

    是对 DataTable 的操作吗
    那就用 ImportRow 方法吧
      

  2.   

    sql 中吗?
    用insert into select .....
      

  3.   

    我不知道lz的意思是不是插入另一张表没有的数据,你可以使用外连接的方法,也可以用insert inte ... select ... not  in ...的语法,但是不推荐,如果你用的是oracle的数据库你还可以用一个vinus的方法
      

  4.   

    --如果“另一张表中”存在
    Insert B Select * From A--如果“另一张表中”不存在
    Select * Into B From A