且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在mysql中存储过程

更新时间:2022-05-28 21:50:21

请看看 ^ ].您肯定会获得帮助.
Please have a look Here[^]. You will surely get some help.


您可以在几乎没有任何差异的任何sql工具中编写以下代码:
这是phpMyAdmin的示例:
You can write this code in any sql tools with little differences:
Here is the example for phpMyAdmin:
create procedure getStudentById(varId int)
begin
    select * from student where student_id=varId;
end



注意:对于phpMyAdmin,不要忘记将Delimiter更改为您在sql脚本中使用的分隔符.在上述情况下,分隔符必须为


Note: for phpMyAdmin do not forget to change the Delimiter to what you have use in the sql script. In the above case, the Delimiter must be