不明确的列名:Sqlite中的DELETE

时间:2016-05-31 21:07:50

标签: android 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 

1 个答案:

答案 0 :(得分: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));