Quantcast
Channel: CSDN博客推荐文章
Viewing all articles
Browse latest Browse all 35570

MYSQL分享:获取存取过程完整定义语句

$
0
0
SELECT db,specific_name AS OBJECT_NAME ,
  CONCAT(
    CHAR(13),
    CHAR(10),
    'DELIMITER $$',
    CHAR(13),
    CHAR(10),
    CHAR(13),
    CHAR(10),
    'USE `',
    db,
    '`$$',
    CHAR(13),
    CHAR(10),
    CHAR(13),
    CHAR(10),
    'DROP PROCEDURE IF EXISTS `',
    specific_name,
    '`$$',
    CHAR(13),
    CHAR(10),
    CHAR(13),
    CHAR(10),
    'CREATE ',
    security_type,
    '=`',
    REPLACE(`definer`, '@', '`@`'),
    '` PROCEDURE `',
    specific_name,
    '` (',
    param_list,
    ')',
    CHAR(13),
    CHAR(10),
    body,
    '$$',
    CHAR(13),
    CHAR(10),
    CHAR(13),
    CHAR(10),
    'DELIMITER ;',
    CHAR(13),
    CHAR(10),
    CHAR(13),
    CHAR(10)
  )  AS DEFINITION 
FROM
  mysql.proc a 
  WHERE `type` = 'PROCEDURE'

作者:c_enhui 发表于2013-6-6 23:26:32 原文链接
阅读:121 评论:0 查看评论

Viewing all articles
Browse latest Browse all 35570

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>