首頁 >資料庫 >mysql教程 >select-用MySql的Navicat创建存储过程总是报1458错误

select-用MySql的Navicat创建存储过程总是报1458错误

WBOY
WBOY原創
2016-06-06 09:40:262144瀏覽

selectmysql存储过程

下面是我穿件存储过程的代码。求大神帮忙看看。真心很急,明天就要用。

<code> 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;</code>
陳述:
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn