本帖最后由 mysh8537 于 2012-10-22 21:02:47 编辑

解决方案 »

  1.   

    oracle不支持except,改成-(减号)。
      

  2.   


    SQL> select distinct S.ID, S.name
      2  from student S
      3  where not exists ( (select course_id
      4  from course
      5  where dept_name = 'Biology')
      6  -
      7  (select T.course_id
      8  from takes T
      9  where S.ID = T.ID));
    -
    *
    第 6 行出现错误:
    ORA-00907: 缺失右括号
      

  3.   

    想起来了 oracle except是用minus代替了
      

  4.   

    minus 和 union 作为连接