yjanb11

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理
select a.*from tr_question_options a left join tr_question b on a.question_id=b.id
where a.del_flag=0 #and a.question_id='52d18304c79d4e80ab3ab000bff9f595'
and LENGTH(question_id)>0 and LENGTH(question_options)>0 and question_options!='/' and question_type in(1,2,3) and (LENGTH(course_exam_id)=0 or course_exam_id is null)
and question_id!='0b64137ecde74805b20def4da8ec0e55' and b.factory_id='3ef41bcb3a354176a5da3c5fe2e4e033'
GROUP BY question_options,question_id HAVING count(1)>1;

  查询试卷题目选项是否重复

 

select a.*from tr_question_options a
left join tr_exam_question b on a.course_exam_id=b.id
where a.del_flag=0 #and a.question_id='52d18304c79d4e80ab3ab000bff9f595'
and LENGTH(a.course_exam_id)>0 and LENGTH(question_options)>0 and question_options!='/' and question_type in(1,2,3) and (LENGTH(a.course_exam_id)>0 or a.course_exam_id is not null)
GROUP BY question_options,question_id  HAVING count(1)>1;

  

posted on 2020-01-10 12:00  yjanb11  阅读(152)  评论(0编辑  收藏  举报