少了个where String sql="select * from cqut_student where Xuehao='"+xuehao+"' "; String str= "select * from cqut_student where Banji_hao='"+banjihao+"' "; 2个地方都要加where --补充 这里其实1条sql就好了 select * from cqut_student where Banji_hao in (select Banji_hao from cqut_student where Xuehao='"+xuehao+"' )" --补充 oracle里字符串...