当前位置:网站首页>MySQL stored procedure
MySQL stored procedure
2022-07-06 17:40:00 【Bald Second Senior brother】
Catalog
What are stored procedures for ?
stored procedure
What are stored procedures for ?
Stored procedures and functions are compiled in advance and stored in a database SQL Collection of statements , Calling stored procedures and functions can simplify a lot of work for application developers , Reduce data transfer between database and application server , It's good for improving the efficiency of data processing .
The difference between stored procedures and functions :
Stored procedures have no return value , Functions have return values
Creation of stored procedures
Define separator :
Why define delimiters , because mysql The default separator in is ; Then use enter to execute this command , But sometimes we need to define a separator without executing commands .
delimiter $
Restore separator
delimiter ;
Create stored procedure
create procedure pro_test1()
-> begin
-> select 'hello word';
-> end$
Calling stored procedure
call pro_test1();
Stored procedure query
1. Query all stored procedures in the database
select name from mysql.proc where db='test';
among test Name the database
2. Querying the status of stored procedures
show procedure status;
3. View the definition of the specified stored procedure
show create procedure pro_test1;
Delete stored procedure
drop procedure pro_test1;
边栏推荐
- [reverse primary] Unique
- Remote code execution penetration test - B module test
- [getting started with MySQL] fourth, explore operators in MySQL with Kiko
- PyTorch 提取中间层特征?
- 【逆向初级】独树一帜
- The art of Engineering (1): try to package things that do not need to be exposed
- 04 products and promotion developed by individuals - data push tool
- yarn : 无法加载文件 D:\ProgramFiles\nodejs\yarn.ps1,因为在此系统上禁止运行脚本
- The most complete tcpdump and Wireshark packet capturing practice in the whole network
- 06个人研发的产品及推广-代码统计工具
猜你喜欢

List集合数据移除(List.subList.clear)

Akamai talking about risk control principles and Solutions

EasyRE WriteUp
![[elastic] elastic lacks xpack and cannot create template unknown setting index lifecycle. name index. lifecycle. rollover_ alias](/img/03/ece7f7b28cd9caea4240635548c77f.jpg)
[elastic] elastic lacks xpack and cannot create template unknown setting index lifecycle. name index. lifecycle. rollover_ alias

Flink parsing (VII): time window

2021-03-22 "display login screen during recovery" can't be canceled. The appearance of lock screen interface leads to the solution that the remotely connected virtual machine can't work normally

TCP connection is more than communicating with TCP protocol

Deploy flask project based on LNMP

Concept and basic knowledge of network layering

CTF reverse entry question - dice
随机推荐
02 personal developed products and promotion - SMS platform
微信防撤回是怎么实现的?
04个人研发的产品及推广-数据推送工具
1. Introduction to JVM
connection reset by peer
【逆向中级】跃跃欲试
Example of batch update statement combining update and inner join in SQL Server
Grafana 9 is officially released, which is easier to use and more cool!
Pyspark operator processing spatial data full parsing (5): how to use spatial operation interface in pyspark
JUnit unit test
自动化运维利器ansible基础
Guidelines for preparing for the 2022 soft exam information security engineer exam
Wordcloud colormap color set and custom colors
Detailed explanation of data types of MySQL columns
Flink parsing (VII): time window
TCP connection is more than communicating with TCP protocol
CTF reverse entry question - dice
Akamai 反混淆篇
Kali2021 installation and basic configuration
华为认证云计算HICA