mysql导入存储过程
查询数据库存储过程
select `name` from mysql.proc where db = 'databaseName' and `type` = 'PROCEDURE';
mariadb操作存存储过程,drop所有节点,create当前节点。
SQL语句:
DROP PROCEDURE IF EXISTS `generate_serial_number_by_date`; DELIMITER ;; CREATE DEFINER=`` PROCEDURE `generate_serial_number_by_date`( IN param_key varchar(100), IN param_org_id varchar(100), IN param_period_date_format varchar(20), OUT result bigint, OUT current_datestr varchar(20)) begin end ;; DELIMITER ;
在存储过程前写DELIMITER;;
在end后写两个分号;;
DELIMITER;
use databaseName;
source /opt/importSql.sql