jin_zzz
千尺梦
2017-11-17 01:57

mybatis+oracle 一条update方法一直报sql命令为结束错误,不知道怎么回事

  • mybatis
<update id="assignPlural" >
    update exam_task set teacherId=#{teacherId} where id in ( 
        select id from ( 

            select id , row_number() over (partition by answerId order by null) m from 

                ( select id , answerId from exam_task where answerId in 
                        (select id from exam_answer where questionId =#{questionId})
                        and
                        answerId not in 
                        (select answerId from exam_task where teacherId=#{teacherId})
                 )
        ) where m=1
     )  where rownum &lt;=#{assignNum} 
</update>
  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

2条回答