Detailed steps to modify MySQL stored procedures

Detailed steps to modify MySQL stored procedures

Preface

In actual development, business requirements are often modified, so it is inevitable to modify the characteristics of the stored procedure.

In MySQL, use the ALTER statement to modify the characteristics of a stored procedure

Syntax

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

Parameter Description

  • Sp_name, which indicates the name of the stored procedure or function
  • Characteristic, which part of the stored procedure is to be modified
  • The values ​​of Characteristic are as follows
  • CONTAINS SQL means that the subroutine contains SQL statements, but does not contain statements that read or write data.
  • NO SQL, indicating that the subroutine does not contain SQL statements
  • READS SQL DATA, indicating that the subroutine contains statements that read data
  • MODIFIES DATA, indicating that the subroutine contains statements for writing data
  • SQL SECURITY {DEFINER | INVOKER}, specifies who has permission to execute
  • DEFINER, which means that only the definer can execute it.
  • INVOKER, indicating that the caller can execute
  • COMMENT'string', indicating comment information

Modify the definition of the stored procedure CountProc1

Change the read and write permissions to MODIFIES SQL DATA and specify that the caller can execute

View modified information

Currently, MySQL does not provide code modification for existing stored procedures.

If you must modify the diam of a stored procedure, you must first delete the stored procedure and then rewrite the code or create a new stored procedure.

This is the end of this article about modifying MySQL stored procedures. For more relevant content about modifying MySQL stored procedures, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope everyone will support 123WORDPRESS.COM in the future!

You may also be interested in:
  • Detailed explanation of creating, calling and managing MySQL stored procedures
  • Introduction to query commands for MySQL stored procedures
  • MySQL stored procedure in, out and inout parameter examples and summary
  • Using cursor loop to read temporary table in Mysql stored procedure
  • Mysql modify stored procedure related permissions issue
  • In-depth explanation of MySQL stored procedures (in, out, inout)
  • How to create a table by month in MySQL stored procedure
  • A brief discussion on MySql views, triggers and stored procedures
  • Detailed example of using if statement in mysql stored procedure
  • Analysis of the advantages and disadvantages of MySQL stored procedures

<<:  JS+Canvas draws a lucky draw wheel

>>:  The forgotten button tag

Recommend

Web Design Help: Web Font Size Data Reference

<br />The content is reproduced from the Int...

Analysis of the ideas of implementing vertical tables in two ways in Vue project

Problem Description In our projects, horizontal t...

Change the MySQL database engine to InnoDB

PS: I use PHPStudy2016 here 1. Stop MySQL during ...

vue3.0+echarts realizes three-dimensional column chart

Preface: Vue3.0 implements echarts three-dimensio...

The latest Linux installation process of tomcat8

Download https://tomcat.apache.org/download-80.cg...

Detailed explanation of this pointing problem in JavaScript

Preface Believe me, as long as you remember the 7...

The difference between clientWidth, offsetWidth, scrollWidth in JavaScript

1. Concept They are all attributes of Element, in...

JavaScript style object and CurrentStyle object case study

1. Style object The style object represents a sin...

Vue implements multiple ideas for theme switching

Table of contents Dynamically change themes The f...

How to implement second-level scheduled tasks with Linux Crontab Shell script

1. Write Shell script crontab.sh #!/bin/bash step...

Use of MySQL SHOW STATUS statement

To do MySQL performance adjustment and service st...

Detailed explanation of JavaScript's Set data structure

Table of contents 1. What is Set 2. Set Construct...

Vue implements sending emoticons in chat box

The specific code for sending emoticons in the vu...