insert into QQqun1 (QQ) select qq from 

解决方案 »

  1.   


    insert into QQqun1 (QQ) values (select Distinct(QQ) from QQqun2 a where  not  exists ( select QQ from QQqun1 b where a.QQ=b.QQ) )
    改为:
    insert into QQqun1 (QQ) select Distinct(QQ) from QQqun2 a where  not  exists ( select QQ from QQqun1 b where a.QQ=b.QQ) 
    自己看看有什么区别?
      

  2.   


    你那样insert语句是一条一条插入的,但是你的values 那个QQ有多条数据,所以不能那样写
     string MyInsert = "insert into QQqun1 (QQ)  select Distinct(QQ) from QQqun2 a where  not  exists ( select QQ from QQqun1 b where a.QQ=b.QQ)"