#MySQL创建存储过程函数
# 存储过程使用大纲,有参数传递
delimiter $$
# 声明一个名称为get_student_introduoce
create procedure add_student_infor(
in p_userName varchar(20),in p_phone varchar(11),in p_sex char(2),in p_introduce varchar(244))
#开始操作
begin
#撰写真正在操作DML+DQL都行
insert into student (userName,phone,sex,introduce) values (p_userName,p_phone,p_sex,p_introduce);
end $$
delimiter;
# 使用函数 (调用存储过程)
call add_student_infor('孟','12812345678','女','信安二班.');
select * from student where userName='孟';
MySQL创建存储过程函数
最新推荐文章于 2025-12-05 18:26:01 发布
1095

被折叠的 条评论
为什么被折叠?



