显示存储过程信息: \g (横向表格采用纵向表格输出)
delimiter $ 改变执行符号,直到mysql碰到$ 开始执行语句命令 set names 解决mysql乱码问题 但mysql重启后又还原到以前字符集状态
call 存储过程名字 () 调用存储过程
参数:create procedure p2(n int) #含参beginselect * from t_category where cid > n;end $
控制结构:create procedure p3(n int, j char(1)) #含参begin if j='h' then #与其他语言不同 必须加then 注意符号= 不是== select * from t_category where cid > n;elseselect * from t_category where cid
存储过程和函数的区别: 名称不同 :存储过程:procedure 函数function 存储过程没有返回值