[英]store procedure MySQL
CREATE DEFINER=`root`@`localhost` PROCEDURE `sp_checklogin`(
IN username varchar(100),
IN password varchar(50),
OUT result varchar(50)
)
begin
if exists (select * from student where tensv = username
and password = password) then
set result = "OK";
else
set result = "failed";
end if;
end
When i call sp_checklogin('vyvy','123456',@a); 当我打电话给sp_checklogin('vyvy','123456',@ a); Result screen
结果画面
vyvy and 123456 is my username and pass in DTB, workbench no results please help me vyvy和123456是我的用户名,并在DTB中传递,工作台无结果,请帮助我
Your result is stored in the session variable @a. 您的结果存储在会话变量@a中。
After calling the procedure you should use 调用程序后,您应该使用
SELECT @a
to get the result 得到结果
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.