第1个回答 2011-01-04
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;本回答被提问者采纳
第2个回答 2011-01-04
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author: <Author,,Name>
-- Create date: <Create Date,,>
-- Description: 查询学生编号
-- =============================================
ALTER PROCEDURE Stu_selectStu_no
AS
BEGIN
SELECT stu_no from student
END
第3个回答 2011-01-03
DELIMITER //
create procedure student()
begin
select stu_no from student;
end//