tempfile tab1 tab2
clear
input a b c d e f
1 2 30 40 50 60
1 2 40 50 60 70
end
save "`tab1'.dta", replace
*-表2
clear
input a b g
1 2 999
1 2 888
end
save "`tab2'.dta", replace
use "`tab1'.dta",clear
sort a b joinby a b using "`tab2'.dta",unmatched(both)
sort a b
drop _merge
list,noobs