CREATE PROCEDURE NAMES AS
NAME VARCHAR (20),
REGNO VARCHAR(100),
BEGIN
SELECT NAME=@NAME FROM STUDENTDETAIL
SELECT REGNO=@REGNO FROM STUDENTDETAIL
END
为什么不创建此存储过程?
答案 0 :(得分:1)
你
CREATE PROCEDURE NAMES
(
NAME VARCHAR (20),
REGNO VARCHAR(100)
)
AS
SELECT * FROM STUDENTDETAIL WHERE NAME=@NAME AND REGN=@REGNO;
GO
在MySQL中
mysql> delimiter //
mysql> CREATE PROCEDURE NAMES (NAME VARCHAR (20), REGNO VARCHAR(100))
-> BEGIN
-> SELECT * FROM STUDENTDETAIL WHERE NAME=@NAME AND REGN=@REGNO;
-> END//