http://www.mysqltutorial.org/getting-started-with-mysql-stored-procedures.aspx

  • The first command is DELIMITER // , which is not related to the stored procedure syntax. The DELIMITER statement changes the standard delimiter which is semicolon ( ; ) to another. In this case, the delimiter is changed from the semicolon( ; ) to double-slashes // Why do we have to change the delimiter? Because we want to pass the stored procedure to the server as a whole rather than letting mysql tool interpret each statement at a time.  Following the END keyword, we use the delimiter //  to indicate the end of the stored procedure. The last command ( DELIMITER; ) changes the delimiter back to the semicolon (;).

delimiter的更多相关文章

  1. MySQL数据库中delimiter的作用概述

    以下的文章主要是向大家描述的是MySQL数据库中delimiter的作用是什么?我们一般都认为这个命令和存储过程关系不大,到底是不是这样的呢?以下的文章将会给你相关的知识,望你会有所收获. 其实就是告 ...

  2. MySql中delimiter的作用是什么?

    这个命令与存储过程没什么关系吧.其实就是告诉mysql解释器,该段命令是否已经结束了,mysql是否可以执行了.默认情况下,delimiter是分号;.在命令行客户端中,如果有一行命令以分号结束,那么 ...

  3. mysql delimiter

    默认情况下,mysql遇到分号; 就认为是一个命令的终止符, 就会执行命令.而有些时候,我们不希望这样,比如存储过程中包含多个语句,这些语句以分号分割,我们希望这些语句作为一个命令,一起执行,怎么解决 ...

  4. Delimiter must not be alphanumeric or backslash 问题及解决

    Warning: preg_match() [function.preg-match]: Delimiter must not be alphanumeric or backslash in 正则表达 ...

  5. 在配置XML时报的The reference to entity "dataSource" must end with the ';' delimiter错误

    <?xml version="1.0" encoding="UTF-8"?> <ECharts> <element>http ...

  6. mysql 存储过程需要DELIMITER

    DELIMITER &&CREATE PROCEDURE syncAdvertiser() BEGIN DECLARE id bigint; DECLARE _cur CURSOR F ...

  7. The reference to entity "characterEncoding" must end with the ';' delimiter

    数据源配置时加上编码转换格式后出问题了: The reference to entity "characterEncoding" must end with the ';' del ...

  8. 举例android项目中的string.xml出现这个The character reference must end with the ';' delimiter.错误提示的原因及解决办法

    今天在一个android项目中的string.xml中写这样一个字符串时出现了下面这个错误提示: The reference to entity "说明" must end wit ...

  9. MySQL两个最简单的delimiter的使用demo

    今天复习MySQL,使用的工具是Navicat for MySQL,写了两个简单的delimiter的demo. 第一个,获取当前时间的年月日时分秒格式的时间: delimiter $$ drop f ...

随机推荐

  1. hdu 4185 二分图匹配

    题意用1*2的木板覆盖矩阵中的‘#’,(木板要覆盖的只能是‘#’),问最多能用几个木板覆盖 将#抽象为二分图的点,一个木板就是一个匹配,注意最后结果要除以2 Sample Input 1 6 .... ...

  2. MATLAB学习笔记(四)——文件操作

    首先,声明,如果学过C的话就可以不用看了,因为是一样的,只要注意一些系统变量的名字稍微变动了而已.都是基于ANSI C语言的标准库函数写的. (一)文件的打开与关闭 一.文件的打开 1.语法 fid= ...

  3. mysql查询表里的重复数据方法:

    INSERT INTO hk_test(username, passwd) VALUES ('qmf1', 'qmf1'),('qmf2', 'qmf11') delete from hk_test  ...

  4. Android 编程下设置 Activity 切换动画

    为 Activity 设置切换动画 我们知道,我们可以在 AndroidManifest.xml 文件中,通过 android:theme 属性设置 Activity 的主题.主题中定义了关于 Act ...

  5. SU Demos-03T-F Analysis-01Sugabor

    先看readme, 运行结果,

  6. BZOJ1075 : [SCOI2007]最优驾车drive

    设$f[i][j][k]$为到达$(i,j)$,用时为$\frac{k}{5lcm}$小时的最低耗油量,然后DP即可. #include<cstdio> const int N=12,M= ...

  7. codevs 1507酒厂选址

    #include<cstdio> #include<cstdlib> using namespace std; int n; int dis[10010],a[10010],x ...

  8. HDU 2222(AC自动机模板题)

    题目链接: http://acm.hdu.edu.cn/showproblem.php?pid=2222 题目大意:多个模式串.问匹配串中含有多少个模式串.注意模式串有重复,所以要累计重复结果. 解题 ...

  9. [leetCode][013] Two Sum 2

    题目: Given an array of integers that is already sorted in ascending order, find two numbers such that ...

  10. C#页面添加提交数据后跳出小弹窗的功能

    很简单,将小弹窗部分写进一个div,利用div的visible属性去控制是否显示,首先默认为false; 当后台程序执行到插入数据完成后,设置session状态值为‘yes’ 判断,当session状 ...