mysql的存储过程

//存储过程只是优化。事物是先编译后优化,速度相对较慢
//存储过程占用的流量也比较少。每次调用只需要传输存储的名称
//每次调用存储过程都是不检查sql是否错误,因为它是编译好的。
//例如: delimiter $$ create procedure p_hello() begin select id from nf_role; select nf_name from nf_role; end $$ ddelimiter ;

  

//调用
call p_hello;

  

//查看某个数据库下的存储过程 
show procedure status where db='nf_shop';

  

原文地址:https://www.cnblogs.com/xin-jun/p/8608776.html