SET ? DECLARE
http://dev.mysql.com/doc/refman/5.7/en/declare-local-variable.html
http://dev.mysql.com/doc/refman/5.7/en/set-variable.html
SET Syntax for Variable Assignment
Local Variable DECLARE Syntax
DECLAREvar_name
[,var_name
] ...type
[DEFAULTvalue
]
This statement declares local variables within stored programs.
SETvariable_assignment
[,variable_assignment
] ...variable_assignment
:
user_var_name
=expr
|param_name
=expr
|local_var_name
=expr
| [GLOBAL | SESSION]
system_var_name
=expr
| [@@global. | @@session. | @@]
system_var_name
=expr
SET
syntax for variable assignment enables you to assign values to different types of variables that affect the operation of the server or clients:
System variables. See Section 6.1.5, “Server System Variables”. System variables also can be set at server startup, as described in Section 6.1.6, “Using System Variables”. (To display system variable names and values, use the
SHOW VARIABLES
statement; see Section 14.7.5.39, “SHOW VARIABLES Syntax”.)User-defined variables. See Section 10.4, “User-Defined Variables”.
Stored procedure and function parameters, and stored program local variables. See Section 14.6.4, “Variables in Stored Programs”.
SET ? DECLARE的更多相关文章
- mysql substring函数截取值后赋给一个declare变量
今天写的一个mysql存储过程涉及到对一个传入参数的字符串截取,然后需要判断截取字符串进行一系列操作,最开始用select subtring() into 这样的方法将截取值赋于declare变量直 ...
- 关于Django 错误 doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS
记录一下 报错 doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS\ 这个问题出现没 ...
- rabbitmq method之queue.declare
queue.declare即申请队列,首先对队列名作处理,若未指定队列名则随机生成一个,然后查询数据库队列是否已经创建,若创建完成则会申请队列返回 handle_method(#'queue.decl ...
- LINUX:read、array、declare
read:要读取来自键盘输入的变量 使用规则: read [-pt] variale 选项与参数: -p:后面接提示字符: -t:后面接等待的“秒数”: 如果read之后不加任何参数,直接加上变量名称 ...
- Ubuntu 下使用declare的问题
Ubuntu在shell的执行上用户root和普通用户是不一样的. 使用vi /etc/passwd 我们就可以看到在用户的最后一行也就是定义shell执行位置的地方root的位置是/bin/bash ...
- dojo分析之declare接口
欢迎转载opendevkit文章, 文章原始地址: http://www.opendevkit.com/?e=57 declare接口是dojo定义类系统的关键函数, 类系统就是抽象,封装,继承.do ...
- 关于The serializable class XXX does not declare a static final serialVersionUID field of type long的警告
编写实体类并且继承序列化接口时候,实体类会有警告,要生成一个静态的serialVersionUID. 上网搜了一下资料,现通俗解释一下: 点击前2个选项,会生成: private static fin ...
- PHP declare(ticks=N); 的作用
一般用法是 declare(ticks=N);拿declare(ticks=1)来说,这句主要作用有两种: 1.Zend引擎每执行1条低级语句就去执行一次 register_tick_function ...
- (转)create table #temptable 临时表 和 declare @bianliang table ()表变量
在开发过程中,经常会遇到使用表变量和本地临时表的情况.下面是对二者的一个介绍: 1. 为什么要使用表变量 表变量是从2000开始引入的,微软认为与本地临时表相比,表变量具有如下优点: a.与其他变量 ...
- 有时候为了方便sql语句的对比和查询,我们可以使用declare来定义变量 上下篇的问题
--定义一些参数 declare @nodeId int,@ekid int ,@ecid int,@eid int,@pid int --列表 SELECT * FROM ( SELECT *,RO ...
随机推荐
- linux多种安装包格式的安装方法
linux多种安装包格式的安装方法 一.rpm包安装方式步骤:1.找到相应的软件包,比如soft.version.rpm,下载到本机某个目录: 2.打开一个终端,su -成root用户: 3.cd s ...
- 使用jQuery Mobile + PhoneGap 开发Android应用程序(转)
使用jQuery Mobile + PhoneGap 开发Android应用程序(转) 一.简介 jQuery Mobile是jQuery在手机上和平板设备上的版本.jQuery Mobile 不仅给 ...
- CC2540开发板学习笔记(三)——外部中断
一.实验内容 通过外部中断方式依次按下按键S1控制LED1的亮灭 二.实验过程 1.电路原理图同上 2.中断的概念 比如说我们在执行main函数时,突然来了个指令.优先级比现在执行的main还高,那我 ...
- VMware安装、配置CentOS
出处:http://www.cnblogs.com/jlily/ 1. 准备CentOS安装镜像文件 官网下载地址:http://www.centos.org/download/ 官方有三个版本:DV ...
- CodeForces 300C --数论
A - A Time Limit:2000MS Memory Limit:262144KB 64bit IO Format:%I64d & %I64u Submit Statu ...
- throw和throw ex的区别
之前,在使用异常捕获语句try...catch...throw语句时,一直没太留意几种用法的区别,前几天调试程序时无意中了解到几种使用方法是有区别的,网上一查,还真是,主要是区别在堆栈信息的起始点不同 ...
- PHP 输出表格单元格的数据之用表单的方式;
echo "<table border=1 class="imagetable" >"; //使用表格格式化数据echo "<for ...
- SU Demos-02Filtering-03Sudipfilt
不足之处,欢迎各位博友批评指正. 进入目录,依照惯例先看Readme, 第一个脚本, 下面是运行结果: 第二个脚本: 运行结果如下: 第三个脚本: 运行结果:
- Google地图接口API之地图类型(六)
1. Google 地图- 基本地图类型 Google Maps API 中提供了以下地图类型: MapTypeId.ROADMAP,用于显示默认的道路地图视图 MapTypeId.SATELLITE ...
- Android MVVM框架RoboBinding初探
RoboBinding是一个实现了数据绑定 Presentation Model(MVVM) 模式的Android开源框架.MVVM模式是MVC模式的重要更新,使得项目结构更加的优美,易于维护以及方便 ...