0
我有兩個產品表Product1和Product2。在字段ProductId上只有一個映射。需要幫助寫入SQL查詢
我想要的是獲取Product2.Exported字段爲false的所有產品id並且 產品id位於Product1但不在Product2表中。
現在我有兩個查詢,我試圖搗成一個。
SELECT ProductId FROM Product1 WHERE ProductId NOT IN(Select ProductId From Product2)
SELECT ProductId FROM Product2 WHERE Exported = 0