当前位置:网站首页>Navicat premium create MySQL create stored procedure
Navicat premium create MySQL create stored procedure
2022-07-06 08:42:00 【Rookie post station 2020】
MySQL Stored procedures are SQL Collection of statements , For example, sometimes we may need a large string of SQL sentence , Or writing SQL You need to set the values of some variables during the statement , At this time, it is absolutely necessary to write a stored procedure .
Writing stored procedures is not an easy task , But using stored procedures can simplify operations , Steps to reduce redundancy , meanwhile , It can also reduce mistakes in the process of operation , Increase of efficiency , Therefore, you should learn to use stored procedures as much as possible .
Use Navicat Premium Tools create stored procedures , New query , Input statement , Finally, click 【 function 】
# If there is a stored procedure with the same name, delete
DROP PROCEDURE IF EXISTS my_test2;
# Create stored procedure , Define names and variables .** The variable name is different from the field name , Sometimes there are inexplicable problems **
CREATE PROCEDURE my_test2(in usern VARCHAR(20),in nick VARCHAR(20))
BEGIN
SELECT * FROM sys_user where username = usern and nickname = nick;
END
Calling stored procedure
边栏推荐
- Cisp-pte practice explanation
- CISP-PTE实操练习讲解
- 深度剖析C语言指针
- How to conduct interface test? What are the precautions? Nanny level interpretation
- Golang force buckle leetcode 1020 Number of enclaves
- Roguelike游戏成破解重灾区,如何破局?
- Leetcode skimming (5.29) hash table
- Excellent software testers have these abilities
- JVM 快速入门
- Analysis of the source code of cocos2d-x for mobile game security (mobile game reverse and protection)
猜你喜欢
JS inheritance method
Target detection - pytorch uses mobilenet series (V1, V2, V3) to build yolov4 target detection platform
Image, CV2 read the conversion and size resize change of numpy array of pictures
2022.02.13 - NC001. Reverse linked list
Charging interface docking tutorial of enterprise and micro service provider platform
Detailed explanation of heap sorting
查看局域网中电脑设备
Marathon envs project environment configuration (strengthen learning and imitate reference actions)
Process of obtaining the electronic version of academic qualifications of xuexin.com
[MySQL] database stored procedure and storage function clearance tutorial (full version)
随机推荐
JVM 快速入门
How to conduct interface test? What are the precautions? Nanny level interpretation
tree树的精准查询
C语言双指针——经典题型
Excellent software testers have these abilities
visdom可视化实现与检查介绍
LDAP Application Section (4) Jenkins Access
从表中名称映射关系修改视频名称
Chrome浏览器的crash问题
Image,cv2读取图片的numpy数组的转换和尺寸resize变化
JS inheritance method
Leetcode question brushing (5.31) string
Pointer advanced --- pointer array, array pointer
如何进行接口测试测?有哪些注意事项?保姆级解读
LDAP application (4) Jenkins access
IOT -- interpreting the four tier architecture of the Internet of things
Rviz仿真时遇到机器人瞬间回到世界坐标原点的问题及可能原因
Light of domestic games destroyed by cracking
可变长参数
Bottom up - physical layer