Home > Database > Mysql Tutorial > mysql生成完整的存储过程定义语句_MySQL

mysql生成完整的存储过程定义语句_MySQL

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-01 13:03:59
Original
1219 people have browsed it

 

SELECT   CONCAT('PR_', p.db,'.',p.name ) FileName ,
CONCAT(
'
DELIMI','TER $$

USE `',p.db,'`$$

DROP PROCEDURE IF EXISTS `',p.name, '`$$

CREATE DEFINER=','`',
LEFT(DEFINER, -1+LOCATE('@',DEFINER)),
'`@`',
RIGHT(DEFINER,LENGTH(DEFINER)-LOCATE('@',DEFINER)),
'`'
,' PROCEDURE `',p.name ,'`(',p.param_list,')
',p.body_utf8,
'$$

DELIMI','TER ;
' ) AS sql_create 
FROM mysql.proc AS p 
WHERE p.db LIKE '%'
AND TYPE LIKE 'PROC%'
ORDER BY p.db,p.name ;
Copy after login

Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
Laravel doesn't read POST request with FormData
From 1970-01-01 08:00:00
0
0
0
php - How to optimize this sql?
From 1970-01-01 08:00:00
0
0
0
Error location, SQL statement
From 1970-01-01 08:00:00
0
0
0
node.js - gulp.task async issue
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template