-- 创建存储过程
CREATE PROCEDURE account_pwd(IN account_id VARCHAR(32), IN account_password VARCHAR(32))
BEGIN
UPDATE account_tab a SET a.`password`=account_password WHERE a.id=account_id;
END
-- 删除存储过程
DROP PROCEDURE account_pwd;
-- 创建存储过程
CREATE PROCEDURE account_pwd(IN account_id VARCHAR(32), IN account_password VARCHAR(32))
BEGIN
UPDATE account_tab a SET a.`password`=account_password WHERE a.id=account_id;
END
-- 删除存储过程
DROP PROCEDURE account_pwd;
-- 查询存储过程
select * from information_schema.routines where routine_type='PROCEDURE' and routine_schema='xxx_db_test';
-- 查看存储过程内容(Create Procedure里面就是创建内容)
show create procedure account_pwd;