在内连接上缺少右括号。

时间:2013-02-20 00:02:21

标签: sql oracle

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);

我在这里做错了什么?

1 个答案:

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

然后尝试此操作(删除AS es):

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;