Base MYSQL Database create stored procedures resolve the Delimiter error
Base MYSQL Database create stored procedures resolve the Delimiter error, It must be created using a query script. You can't use the Create Procedure Wizard directly.
for example:
Delimiter $$ CREATE PROCEDURE
PR_SELSTATION( in Sname varchar(50), in Scode varchar(50) ) BEGIN if Sname='' and Scode <> '' then Begin SELECT NUM_STN ,NAME_STN ,SHORTNAME_STN ,IDEOBJ_STN ,IDENO_STN ,THISFLAG_STN ,QUICKKEY_STN ,STNO_STN ,(Select VALUE_PARAV From TB_SYS_PARAV Where NUM_PARAV=STASPECT_STN) as dierction_STN FROM TB_SYS_STATION WHERE NUM_STN LIKE concat('%',Scode,'%'); end; end if; if Scode='' and Sname <> '' then Begin SELECT NUM_STN ,NAME_STN ,SHORTNAME_STN ,IDEOBJ_STN ,IDENO_STN ,THISFLAG_STN ,QUICKKEY_STN ,STNO_STN ,(Select VALUE_PARAV From TB_SYS_PARAV Where NUM_PARAV=STASPECT_STN) as dierction_STN FROM TB_SYS_STATION WHERE NAME_STN LIKE concat('%',Sname,'%'); END; end if; if Sname<>'' And Scode<>'' then Begin SELECT NUM_STN ,NAME_STN ,SHORTNAME_STN ,IDEOBJ_STN ,IDENO_STN ,THISFLAG_STN ,QUICKKEY_STN ,STNO_STN ,(Select VALUE_PARAV From TB_SYS_PARAV Where NUM_PARAV=STASPECT_STN) as dierction_STN FROM TB_SYS_STATION WHERE NAME_STN LIKE concat('%',Sname,'%') And NUM_STN LIKE concat('%',Scode,'%'); End; end if; END$$
Base MYSQL Database create stored procedures resolve the Delimiter error的更多相关文章
- Why Stored Procedures?
http://www.w3resource.com/mysql/mysql-procedure.php Stored procedures are fast. MySQL server takes s ...
- [转]Oracle Stored Procedures Hello World Examples
本文转自:http://www.mkyong.com/oracle/oracle-stored-procedures-hello-world-examples/ List of quick examp ...
- Home / Python MySQL Tutorial / Calling MySQL Stored Procedures in Python Calling MySQL Stored Procedures in Python
f you are not familiar with MySQL stored procedures or want to review it as a refresher, you can fol ...
- [MySQL] Stored Procedures 【转载】
Stored routines (procedures and functions) can be particularly useful in certain situations: When mu ...
- An Introduction to Stored Procedures in MySQL 5
https://code.tutsplus.com/articles/an-introduction-to-stored-procedures-in-mysql-5--net-17843 MySQL ...
- Cursors in MySQL Stored Procedures
https://www.sitepoint.com/cursors-mysql-stored-procedures/ After my previous article on Stored Proce ...
- MySQL Error Handling in Stored Procedures 2
Summary: this tutorial shows you how to use MySQL handler to handle exceptions or errors encountered ...
- mysql之CREATE DATABASE Syntax(创建数据库)
一:语法 CREATE {DATABASE | SCHEMA} [IF NOT EXISTS] db_name #SCHEMA是DATABASE的同义词 [IF NOT EXITTS]可防止建库是已经 ...
- Spring, Hibernate and Oracle Stored Procedures
一篇英文博文,写的是利用hibernate处理存储过程中的游标等等: Motivation: While there are a few resources available online for ...
- Good Practices to Write Stored Procedures in SQL Server
Reference to: http://www.c-sharpcorner.com/UploadFile/skumaar_mca/good-practices-to-write-the-stored ...
随机推荐
- centos环境下nginx1.19.7离线升级至1.22.1
环境 centos7 nginx1.19.7 下载新版本nginx 下载地址:http://nginx.org/en/download.html 升级 先看一下原版本: 新安装包传至服务器,升级: # ...
- 【二叉树】二叉树的深度优先遍历DFS(前中后序遍历)和广度优先遍历BFS(层序遍历)详解【力扣144,94,145,102】【超详细的保姆级别教学】
[二叉树]二叉树的深度优先遍历(前中后序遍历)和广度优先遍历(层序遍历)详解[超详细的保姆级别教学] 先赞后看好习惯 打字不容易,这都是很用心做的,希望得到支持你 大家的点赞和支持对于我来说是一种非常 ...
- 主机--Host
概念:主机是用于构建应用程序和服务.封装应用资源的对象,负责程序的启动和生命周期的管理,简单来说主机即应用程序. 主机运行:当主机运行的时候,他会将托管在服务容器集合里面注册的IHostService ...
- 提升正则读写效率,超好用的正则图解工具Regulex与在线调试工具regexr
壹 ❀ 引 正则表达式可以说是不少开发者心中的一根刺,平时使用场景好像也不多,但一旦要用写起来又有些头疼.抱着长痛不如短痛的想法,我曾在2019年年末,花了半个月时间完整读完了老姚的正则迷你书,并在博 ...
- TCP与UDP异同
TCP与UDP异同 TCP/IP模型的运输层有两个不同的协议:UDP用户数据报协议与TCP传输控制协议. 相同点 TCP与UDP都是运行在运输层的协议. TCP与UDP的通信都需要开放端口. 不同点 ...
- docker启动nginx https自签名证书配置
启动测试应用时, 有时需要自己配置证书签名: 1 使用系统自带openssl openssl req \ > -x509 \ > -nodes \ > -days 365 \ > ...
- win32 - ListView_GetItemPosition的使用
ListView_GetItemPosition : Gets the position of a list-view item 理论上获得桌面图标的正确方法是使用shell项,=> IFold ...
- [WEB安全] CSRF攻击和防御
一.什么是CSRF 跨站请求伪造(英语:Cross-site request forgery),也被称为 one-click attack 或者 session riding,通常缩写为 CSRF 或 ...
- At-abc342
AtCoder Beginner Contest 342 (已更新:C D) C 似曾相识的经典映射题--而只会map的蒟蒻成功又被卡住了 简单的用map映射无法处理如r->a,a->r这 ...
- 学习go语言编程之错误处理
error接口 Golang中有一个关于错误处理的标准模式,即:error接口. type error interface { Error() string } 对于大多数函数,如果要返回错误,大致上 ...