MySQL PLSQL Demo

drop procedure if exists p_hello_world;

create procedure p_hello_world()
begin
    select sysdate();
end;

call p_hello_world();
drop procedure if exists p_hello_world;

create procedure p_hello_world(in v_id int)
begin
    select * from t_user t where t.id = v_id;
end;

call p_hello_world(1);
原文地址:https://www.cnblogs.com/nick-huang/p/4614269.html