当前位置:网站首页>Navicat Premium 创建MySql 创建存储过程
Navicat Premium 创建MySql 创建存储过程
2022-07-06 08:41:00 【菜鸟驿站2020】
MySQL 存储过程是一些 SQL 语句的集合,比如有时候我们可能需要一大串的 SQL 语句,或者说在编写 SQL 语句的过程中需要设置一些变量的值,这个时候我们就完全有必要编写一个存储过程。
编写存储过程并不是件简单的事情,但是使用存储过程可以简化操作,且减少冗余的操作步骤,同时,还可以减少操作过程中的失误,提高效率,因此应该尽可能的学会使用存储过程。
使用 Navicat Premium 工具创建存储过程,新建查询,输入语句,最后点击【运行】

#存在同名的存储过程则删除
DROP PROCEDURE IF EXISTS my_test2;
#创建存储过程,定义名称和变量。**变量名与字段名不要一样,有时会出现莫名的问题**
CREATE PROCEDURE my_test2(in usern VARCHAR(20),in nick VARCHAR(20))
BEGIN
SELECT * FROM sys_user where username = usern and nickname = nick;
END
调用存储过程

边栏推荐
- JVM 快速入门
- 【MySQL】锁
- win10系统中的截图,win+prtSc保存位置
- Sublime text in CONDA environment plt Show cannot pop up the problem of displaying pictures
- China polyether amine Market Forecast and investment strategy report (2022 Edition)
- 电脑F1-F12用途
- [2022 Guangdong saim] Lagrange interpolation (multivariate function extreme value divide and conquer NTT)
- CISP-PTE实操练习讲解
- 深度剖析C语言数据在内存中的存储
- VMware virtualization cluster
猜你喜欢

深度剖析C语言指针

Problems in loading and saving pytorch trained models

根据csv文件某一列字符串中某个数字排序

Computer cleaning, deleted system files

Image, CV2 read the conversion and size resize change of numpy array of pictures
![[MySQL] log](/img/e9/1617122888c096cf6aba2bdb88f0ef.png)
[MySQL] log
![Verrouillage [MySQL]](/img/ce/9f8089da60d9b3a3f92a5e4eebfc13.png)
Verrouillage [MySQL]

Target detection - pytorch uses mobilenet series (V1, V2, V3) to build yolov4 target detection platform

Precise query of tree tree

角色动画(Character Animation)的现状与趋势
随机推荐
Modify the video name from the name mapping relationship in the table
[MySQL] database stored procedure and storage function clearance tutorial (full version)
Synchronized solves problems caused by sharing
个人电脑好用必备软件(使用过)
The problem and possible causes of the robot's instantaneous return to the origin of the world coordinate during rviz simulation
Sublime text using ctrl+b to run another program without closing other runs
Charging interface docking tutorial of enterprise and micro service provider platform
Precise query of tree tree
ROS compilation calls the third-party dynamic library (xxx.so)
Deep learning: derivation of shallow neural networks and deep neural networks
电脑清理,删除的系统文件
@JsonBackReference和@JsonManagedReference(解决对象中存在双向引用导致的无限递归)
tree树的精准查询
角色动画(Character Animation)的现状与趋势
Process of obtaining the electronic version of academic qualifications of xuexin.com
visdom可视化实现与检查介绍
win10系统中的截图,win+prtSc保存位置
MySQL learning record 10getting started with JDBC
Purpose of computer F1-F12
游戏解包的危害及资源加密的重要性