0
SELECT COUNT(1)
FROM (CMEOWN.ird_no_preselection_1        AS t1
INNER JOIN CMEOWN.ird_no_preselection_1_a AS t2
ON t1.ird_number       = t2.ird_number
AND t1.location_number = t2.location_number);

我在这里做错了什么?

4

1 回答 1

3

为什么不用括号:

SELECT COUNT(1)
FROM CMEOWN.ird_no_preselection_1        AS t1
INNER JOIN CMEOWN.ird_no_preselection_1_a AS t2
ON t1.ird_number       = t2.ird_number
AND t1.location_number = t2.location_number;

然后试试这个(删除ASes):

SELECT COUNT(1)
FROM CMEOWN.ird_no_preselection_1 t1
INNER JOIN CMEOWN.ird_no_preselection_1_a t2
ON t1.ird_number       = t2.ird_number
AND t1.location_number = t2.location_number;
于 2013-02-20T00:04:09.483 回答