有关存储过程的问题
内容如下:CREATE PROCEDURE SP_AVG
@COUNT INT OUTPUT,
@WRITTEN_SCORE INT = 60,
@LAB_SCORE INT = 60
AS
IF(NOT @WRITTEN_SCORE BETWEEN 0 AND 100 OR NOT @LAB_SCORE BETWEEN 0 AND 100)
BEGIN
RAISERROR('及格线错误,请指定1-100之间的分数,系统中断退出')
RETURN
END
DECLARE
@WRITTEN_SCORE_AVG FLOAT,
@LAB_SCORE_AVG FLOAT
SELECT
@WRITTEN_SCORE_AVG = AVG(I_EXAM_WRITTEN_SCORE),
@LAB_SCORE_AVG = AVG(I_EXAM_LAB_SCORE)
FROM
TAB_EXAM_INFO
PRINT '笔试平均分:'+CONVERT(VARCHAR(5),@WRITTEN_SCORE_AVG)
PRINT '机试平均分:'+CONVERT(VARCHAR(5),@LAB_SCORE_AVG)
IF(@WRITTEN_SCORE_AVG > 70 AND @LAB_SCORE_AVG > 70)
PRINT '本次考试成绩:优秀'
ELSE
PRINT '本次考试成绩:较差'
请问他报错问题是
消息 102,级别 15,状态 1,过程 SP_AVG,第 8 行
')' 附近有语法错误。
请问怎么错了阿 有高手解答下么