开发者

Database - Query

I have two Database (eg. two .mdb file). both have same name, same table and same field. the difference is one is old and other is updated copy of .mdb file. i want to copy only new records from the updated copy of the .md开发者_运维知识库b to the older one. is there any way other than iterate trough all the records and compare and filter only newer one?


select * 
from A 
where (col1,col2,…) not in 
(select col1,col2,… from B) 
union all 
select * from B 
where (col1,col2,…) not in 
(select col1,col2,… from A); 

Edit: sorry, you only need to do this one way.

 select * from B 
where (col1,col2,…) not in 
(select col1,col2,… from A); 
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜