当前位置:网站首页>How to write the statement of executing stored procedure in MySQL
How to write the statement of executing stored procedure in MySQL
2022-06-21 07:31:00 【Yisu cloud】
mysql How to write statements that execute stored procedures in
This article mainly introduces mysql How to write the statements that execute stored procedures in , The content is detailed and easy to understand , The operation is simple and fast , It has certain reference value , I believe that after reading this article mysql How to write an article about the statements that execute stored procedures in , Let's have a look .
mysql The statement that executes the stored procedure in is “CALL”.CALL Statement can call the specified stored procedure , After calling the stored procedure , The database system will execute SQL sentence , Then return the result to the output value ; The grammar is “CALL The name of the stored procedure ([ Parameters [...]]);”.mysql In the use of CALL Statement to call and execute a stored procedure requires EXECUTE Permission can only take effect .

The operating environment of this tutorial :windows7 System 、mysql8 edition 、Dell G3 The computer .
mysql The statement that executes the stored procedure in is “CALL”.
MySQL CALL sentence
MySQL Use in CALL Statement to call the stored procedure . After calling the stored procedure , The database system will execute SQL sentence , Then return the result to the output value .
To call and execute a stored procedure, you need to have EXECUTE jurisdiction (EXECUTE Information about permissions is stored in information_schema Database based USER_PRIVILEGES In the table ).
CALL Statement to receive the name of a stored procedure and any parameters that need to be passed to it , The basic grammatical form is as follows :
CALL sp_name([parameter[...]]);
among ,sp_name Represents the name of the stored procedure ,parameter Parameters representing stored procedures .
MySQL CALL Statement to call and execute a stored procedure
Create name as ShowStuScore Stored procedure , The function of the stored procedure is to query the student's grade information from the student's grade information table
DELIMITER //CREATE PROCEDURE ShowStuScore()BEGINSELECT * FROM tb_students_score;END //

Call and execute stored procedures ShowStuScore()
CALL ShowStuScore();

explain : Because a stored procedure is actually a function , So the stored procedure name needs to be followed by ( ) Symbol , Even if you don't pass parameters, you need .
About “mysql How to write statements that execute stored procedures in ” That's all for this article , Thank you for reading ! I'm sure you're right “mysql How to write statements that execute stored procedures in ” Knowledge has a certain understanding , If you want to learn more , Welcome to the Yisu cloud industry information channel .
边栏推荐
- EasyExcel-简介-01
- Mathematics is a tool for solving problems
- QML控件类型:Drawer
- 【毕业季-进击的技术er】:即将大四在校生的技术分享,未来共勉
- 如何安装Visual Studio Code编辑器?
- 24 parameter estimation interval estimation of two population parameters
- Easyexcel exclude display field-02
- 数学是用于解决问题的工具
- mysql的安装路径如何查看
- [flutter special topic] 72 graphic minimalist custom running lamp acemarquee yyds dry goods inventory
猜你喜欢

Deploy ZABBIX enterprise level distributed monitoring

RDKit | 基于Murcko骨架聚类化合物库

动态规划解决打家劫舍问题

arduino有关软件卸载,库的卸载问题

mysql存储过程中的循环语句怎么写

Google Earth engine (GEE) - Global farmland organic soil carbon and nitrogen emissions (1992-2018) data set
![CUDA or FPGA for special purpose 3D graphics computations? [closed]](/img/65/a214d137e230b1a1190feb03660f2c.jpg)
CUDA or FPGA for special purpose 3D graphics computations? [closed]

Minesweeping - C language - Advanced (recursive automatic expansion + chess mark)

Postman发布API文档

RDKIT | 基于分子指纹的分子相似性
随机推荐
RPA(影刀)无需写代码抓取某东的商品信息
Unittest使用
stm32中定义和声明问题
Vite + whistle: a development environment proxy solution once and for all
24 parameter estimation interval estimation of two population parameters
What is Eureka? What can Eureka do? How does Eureka work?
[flutter special topic] 72 graphic minimalist custom running lamp acemarquee yyds dry goods inventory
17 statistics and their sampling distribution statistics and distribution
MySQL MHA
Unittest use
IDM mobile terminal function upgrade description
RDKit | 基于Murcko骨架聚类化合物库
18 statistics and its sampling distribution chi square distribution-t distribution-f distribution
如何利用MES管理系统实现防错和预警
Build a code CR diff platform from 0 to 1
Deploy ZABBIX enterprise level distributed monitoring
RDKit | 合成可行性分数--SA SCORE
RPA (shadow knife) does not need to write code to capture the product information of an East
Type de contrôle qml: Drawer
Can customer managers be relied on online? Is the fund safe