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 PROCEDUREPR_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 ...
随机推荐
- 太强了!本地存档一键导入 Sealos 帕鲁专属服务器
上一篇:幻兽帕鲁 Palworld 私有服务器一键部署教程 作为一名资深帕鲁,我的职责就是帮助各位帕鲁主人们闭着眼睛部署私服,完全不用带脑子. 我就喜欢群里的帕鲁老板们压榨我,拿鞭子抽我让我赶紧上新功 ...
- Windows 11 ISO原版镜像文件下载(2024年01月)
Windows 11 (business editions), version 23H2 (x64) - DVD (Chinese-Simplified) 链接:https://pan.baidu.c ...
- 取代传统BIOS的EFI和UEFI究竟是什么?
传统的蓝白BIOS界面可以说是陪伴着很多玩家共同成长,不过在英特尔发布Sandy Bridge架构处理器的时候,传统BIOS也到了和我们说再见的时间,采用图形化界面的EFI以及UEFI很快就取代了传统 ...
- 使用私有gitlab搭建gitbook持续集成
目录 环境搭建 1. 安装 Node.js 2. 安装 gitbook 3. 安装 Gitlab Runner 4. 注册Runner gitbook 配置 1. 目录结构 2. 命令行 3. 插件 ...
- 捉虫日记:使用OpenGL加载模型 (2023/12/11)
前天晚上,花了一个小时解决了编译Assimp时的报错问题,顺便写了篇随笔.今天继续OpenGL的学习,不出意料地再次踩坑,好在最后都解决了. 今天主要学习使用Assimp加载模型,原理很简单: ...
- 【AI视频教程】只需5步,AI作出鸡你太美视频
1.视频效果 黄昏见证虔诚的信徒 2.准备工作 制作视频效果,需要准备下面3个条件: 准备stable diffusion的环境 剪辑一段[鸡你太美]原版视频 stable diffusion安装sd ...
- Java开发学习(三十八)----SpringBoot整合junit
先来回顾下 Spring 整合 junit @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(classes = Spring ...
- HBase-hbase shell操作
hbase shell操作 一.DDL操作 1.开启hbase shell hbase shell 2.查看hbase状态 Status 3.查看hbase版本 Version 4.创建命名空间 cr ...
- CentOS7 卸载/home 扩大/root空间
卸载home 备份home分区文件 # 新系统无视 tar cvf /tmp/home.tar /home 修改fstab(这一步非常重要,千万别漏了) 准备卸载/home文件系统,centos启动时 ...
- SpringBoot+MybatisPlus实现关联表查询
1.说明 最近写代码用到了mybatisPlus涉及到关联表查询.需求是这样的: 我有一个专业表major其中有个字段是所属院系dept_id,我需要通过这个dept_id关联院系表departmen ...