SQL子查询ORA-01427

时间:2014-06-16 20:19:05

标签: sql oracle oracle-sqldeveloper

我的sql代码:

    SELECT COUNT(*)
FROM T_DATA_ALUNO_TURNO at, T_DATA_TURNO dt
WHERE at.ALUNOID = (SELECT DISTINCT ALUNOID
                    FROM T_DATA_ALUNO_REGLECTIVO) AND
      at.TURNOID=dt.ID;

我收到了这个错误:

ORA-01427: single-row subquery returns more than one row"

任何方式进行此查询?

1 个答案:

答案 0 :(得分:1)

尝试IN而不是= for at.ALUNOID