sqlServer 查詢A表比B表多的數據

--B表比A表多的數據

select * from ent_slf_expect_inventory_copy1 B where (
select count(1) as num from ent_slf_expect_inventory A where A.institution_id = B.institution_id
and B.product_id = A.product_id
and B.year_month = A.year_month
) = 0

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章