2016-05-31 47 views
0

這是我的查詢。不明確的列名:DELETE在Sqlite中

DELETE 
FROM CategoryProduct_MM 
WHERE PrdID IN 
(SELECT PrdID FROM CategoryProduct_MM t1 
INNER JOIN db2.CategoryProduct_MM t2 
ON (t1.PrdID = t2.PrdID AND t1.CategoryID=t2.CategoryID)); 

爲什麼我得到這個錯誤?

ambiguous column name: PrdID: DELETE 

回答

0
DELETE 
FROM CategoryProduct_MM 
WHERE PrdID IN 
(SELECT t1.PrdID FROM CategoryProduct_MM t1 
INNER JOIN db2.CategoryProduct_MM t2 
ON (t1.PrdID = t2.PrdID AND t1.CategoryID=t2.CategoryID));