当前位置:网站首页>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
边栏推荐
- Problems in loading and saving pytorch trained models
- China dihydrolaurenol market forecast and investment strategy report (2022 Edition)
- C language double pointer -- classic question type
- Marathon envs project environment configuration (strengthen learning and imitate reference actions)
- win10系统中的截图,win+prtSc保存位置
- China high purity silver nitrate Market Research and investment strategy report (2022 Edition)
- What is CSRF (Cross Site Request Forgery)?
- Chrome浏览器的crash问题
- UnsupportedOperationException异常
- Precise query of tree tree
猜你喜欢
Chrome浏览器的crash问题
Roguelike游戏成破解重灾区,如何破局?
JS native implementation shuttle box
MySQL learning records 12jdbc operation transactions
电脑清理,删除的系统文件
pytorch训练好的模型在加载和保存过程中的问题
查看局域网中电脑设备
Deep anatomy of C language -- C language keywords
Analysis of the source code of cocos2d-x for mobile game security (mobile game reverse and protection)
可变长参数
随机推荐
JVM quick start
LDAP應用篇(4)Jenkins接入
Chrome浏览器的crash问题
egg. JS getting started navigation: installation, use and learning
@JsonBackReference和@JsonManagedReference(解决对象中存在双向引用导致的无限递归)
Function coritization
堆排序详解
Computer cleaning, deleted system files
Excellent software testers have these abilities
China vanadium battery Market Research and future prospects report (2022 Edition)
Purpose of computer F1-F12
Roguelike game into crack the hardest hit areas, how to break the bureau?
JVM 快速入门
Browser thread
查看局域网中电脑设备
Hutool gracefully parses URL links and obtains parameters
Colorlog combined with logging to print colored logs
The ECU of 21 Audi q5l 45tfsi brushes is upgraded to master special adjustment, and the horsepower is safely and stably increased to 305 horsepower
Problems in loading and saving pytorch trained models
logback1.3. X configuration details and Practice