mysql 存储过程提示错误!!求高人解答

-- 如果加了分号还不行的话,提示的错误应该是 错误:PLS-00428: 在此 SELECT 语句中缺少 INTO 子句 原因是单独的一个select语句在存储过程中是不应该存在的,所以应该改成select stu_no into 的模式 create procedure student()is v_stu_no student.stu_no%TYE;begin select stu_no into v_...
mysql 存储过程提示错误!!求高人解答
create procedure student()
begin
select stu_no from student; -- 加个分号
end;

-- 如果加了分号还不行的话,提示的错误应该是
错误:PLS-00428: 在此 SELECT 语句中缺少 INTO 子句
原因是单独的一个select语句在存储过程中是不应该存在的,所以应该改成select stu_no into 的模式
create procedure student()
is
v_stu_no student.stu_no%TYE;
begin
select stu_no into v_stu_no from student where rownum <= 1; -- 改成select into 字句
end;2017-05-18
mengvlog 阅读 9 次 更新于 2025-07-20 22:08:34 我来答关注问题0
檬味博客在线解答立即免费咨询

mySQL相关话题

Copyright © 2023 WWW.MENGVLOG.COM - 檬味博客
返回顶部