String sql2="select cou_name from course,courseinfo,grade "+
"where grade.cou_id=course.cou_id "+
"and grade.cou_id=courseinfo.cou_id "+
"and grade.stu_id='"+stu_id+"' "+
"and grade.isdual=0 "+
"and (courseinfo.cou_day,courseinfo.cou_time) in "+
"(select cou_day,cou_time from courseinfo where "+
"cou_id='"+cou_id+"')";
rs=stmt.executeQuery(sql2);
以上代码运行报错显示
这段语句功能是判断是否与已经选的课程时间冲突的
(courseinfo.cou_day,courseinfo.cou_time) in "+"(select cou_day,cou_time from courseinfo where "+ "cou_id='"+cou_id+"')"这块语句有问题的,我拿掉了就正常了,请问这部分SQL语句该怎么写?
------解决方案--------------------