日期:2014-05-17 浏览次数:20574 次
insert C select USERID,USERNAME,SEX,AGE,STATE from A where not exists(select 1 from B where a.USERID=b.USERID and a.USERNAME=b.USERNAME and a.SEX=b.SEX and a.AGE=b.age and a.STATE=b.STATE )
------解决方案--------------------
INSERT C SELECT userid,username,sex,age,state FROM a WHERE NOT EXISTS (SELECT 1 FROM b a.userid=userid and a.username=b.username AND a.sex=b.sex and a.age=b.age AND a.state=b.state )