当前位置:网站首页>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;
边栏推荐
- [ciscn 2021 South China]rsa writeup
- Program counter of JVM runtime data area
- 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
- Remote code execution penetration test - B module test
- Integrated development management platform
- [reverse] repair IAT and close ASLR after shelling
- Interpretation of Flink source code (II): Interpretation of jobgraph source code
- Virtual machine startup prompt probing EDD (edd=off to disable) error
- 虚拟机启动提示Probing EDD (edd=off to disable)错误
- 华为认证云计算HICA
猜你喜欢

Akamai 反混淆篇

CTF逆向入门题——掷骰子

Akamai anti confusion

Final review of information and network security (based on the key points given by the teacher)

自动答题 之 Selenium测试直接运行在浏览器中,就像真正的用户在操作一样。

微信防撤回是怎么实现的?

Jetpack compose 1.1 release, based on kotlin's Android UI Toolkit

Program counter of JVM runtime data area

Automatic operation and maintenance sharp weapon ansible Foundation

【逆向初级】独树一帜
随机推荐
【Elastic】Elastic缺少xpack无法创建模板 unknown setting index.lifecycle.name index.lifecycle.rollover_alias
Quick start of Hongmeng system
Akamai anti confusion
02个人研发的产品及推广-短信平台
MySQL Advanced (index, view, stored procedures, functions, Change password)
Flink parsing (IV): recovery mechanism
Solrcloud related commands
Redis快速入门
The art of Engineering (1): try to package things that do not need to be exposed
Xin'an Second Edition: Chapter 25 mobile application security requirements analysis and security protection engineering learning notes
[mmdetection] solves the installation problem
05 personal R & D products and promotion - data synchronization tool
Grafana 9 正式发布,更易用,更酷炫了!
JVM 垃圾回收器之Serial SerialOld ParNew
沉淀下来的数据库操作类-C#版(SQL Server)
基于LNMP部署flask项目
yarn : 无法加载文件 D:\ProgramFiles\nodejs\yarn.ps1,因为在此系统上禁止运行脚本
List集合数据移除(List.subList.clear)
[rapid environment construction] openharmony 10 minute tutorial (cub pie)
pip install pyodbc : ERROR: Command errored out with exit status 1