delete from B where B.X not in (select X from A)

解决方案 »

  1.   

    谢谢chechy,
    但如果将A表与B表的字段X相比较,如果A表没有B表的某条记录,则将B表该条记录的X、Y字段插入至A表,SQL语句该怎么写?
      

  2.   

    InSert Into A (X,Y) Select X,Y From B Where B.X not in (Select X from A) 
      

  3.   

    insert into A(X, Y) select X, Y from B where B.X not in (select X from A)
      

  4.   

    tikkypeng(千两狂死郎)你的速度好快。
      

  5.   

    thank chenchy and tikkypeng.
    马上给分!