有两个表,A表和B表,都是一样的结构,A表和B表既有相同的记录也有不同的记录,现在想把B表中有而A表中没有的记录添加到A表中,不管A表中有而B表中没有的记录,请问如何操作?

解决方案 »

  1.   

    Insert A Select * From B Where 關鍵字 Not In (Select 關鍵字 From A)
      

  2.   

    Insert A Select B.* From B Left Join A On A.關鍵字 = B.關鍵字 Where A.關鍵字 Is Null
      

  3.   

    insert a select b.* from B left Join A on b.id=a.id where a.id is null
      

  4.   

    试验出错,用 insert into 就可以了,好了,谢谢!
      

  5.   

    试验出错,用  insert  into  就可以了,好了,谢谢!
    结贴。