在JDBC中,您的SQL语句不应以分号终止。
更改
String command = "SELECt distinct fname, lname, student_id FROM student"+ " where degree='"+ degree + "';";
至
String command = "SELECt distinct fname, lname, student_id FROM student"+ " where degree='"+ degree + "'";
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)