下面是我穿件存储过程的代码。求大神帮忙看看。真心很急,明天就要用。
create procedure searchStudentGrade(in id char) begin if id is null select student.StudentID,student.StudentName,student.ClassNumber,grade.ExamID,course.CourseName,grade.Grade,course.CourseID from student,grade,course where student.StudentID=grade.StudentID and grade.CourseID=course.CourseID; else select student.StudentID,student.StudentName,student.ClassNumber,grade.ExamID,course.CourseName,grade.Grade,course.CourseID from student,grade,course where student.StudentID=grade.StudentID and grade.CourseID=course.CourseID and grade.StudentID=id; end if;end;
声明:本网页内容旨在传播知识,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。TEL:177 7030 7066 E-MAIL:11247931@qq.com