string querySql="\0"; querySql+="select sno '学生学号',sname '姓名',sex '性别',dataStruct '数据结',operationSystem '操作系',softWareProcess '软件过' ,compileTheory '编译原' from stu_info where averageScore>(select averageScore from stu_info where sname='"; querySql+=name; querySql+="')"; msc.showQuery(querySql); system("pause"); }
int main() { //连接数据库 msc.connect("root","123321",dataBase); /*第一次执行时要建立一个学业生信息表*/ //createTable();
int choice; paintMainMenu(); cin>>choice; while(choice) { switch(choice) { case 1: add(); break; case 2: del(); break; case 3: del(); break; case 4: showTableExceptAvgScore(); break; case 5: showAndOrderAvgScoreByPerson(); break; case 6: showAvgScoreBySubject(); break; case 7: showTopScoreByPerson(); break; case 8: showTopScoreBySubject(); break; case 9: selectBySex(); break; case 10: selectByOneAvgScore(); break; default: break; } paintMainMenu(); cin>>choice; }