Jump to content
  • Hello visitors, welcome to the Hacker World Forum!

    Red Team 1949  (formerly CHT Attack and Defense Team) In this rapidly changing Internet era, we maintain our original intention and create the best community to jointly exchange network technologies. You can obtain hacker attack and defense skills and knowledge in the forum, or you can join our Telegram communication group to discuss and communicate in real time. All kinds of advertisements are prohibited in the forum. Please register as a registered user to check our usage and privacy policy. Thank you for your cooperation.

    TheHackerWorld Official

  • 0

MySQL修改存储过程的详细步骤

 Share


HACK1949

Question

MySQL修改存储过程的详细步骤

5fd71821156f5.png

在实际开发中,业务需求修改的情况时有发生,这样,不可避免的需要修改存储过程的特征

MySQL中,使用ALTER语句修改存储过程的特性

语法格式

ALTER {PROCEDURE | FUNCTION} sp_name [characteristic……]

参数说明

  • Sp_name,表示存储过程或函数的名称
  • characteristic,表示要修改存储过程的哪个部分
  • Characteristic的取值如下
  • CONTAINS SQL,表示子程序包含SQL语句,但是,不包含读或写数据的语句
  • NO SQL,表示子程序中,不包含SQL语句
  • READS SQL DATA,表示子程序中,包含读数据的语句
  • MODIFIES DATA,表示子程序中,包含写数据的语句
  • SQL SECURITY {DEFINER | INVOKER},指明谁有权限来执行
  • DEFINER,表示只有定义者,自己才能够执行
  • INVOKER,表示调用者可以执行
  • COMMENT'string',表示注释信息

修改存储过程CountProc1的定义

将读写权限,改为MODIFIES SQL DATA,并指明调用者可以执行

20201214121138220.png?20201114121149

查看修改后的信息

20201214121159043.png?2020111412126

目前,MySQL还不提供对已存在的存储过程的代码修改

如果,一定要修改存储过程的diam,必须,先将存储过程删除之后,在重新编写代码,或者创建一个新的存储过程。

Link to post
Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

 Share

discussion group

discussion group

    You don't have permission to chat.
    • Recently Browsing   0 members

      • No registered users viewing this page.
    ×
    ×
    • Create New...