有这样一个需求,要求在mysql存储过程中使用到事务,而且执行的是动态的sql语句
代码如下:
BEGIN
DECLARE in_data TEXT;
/** 标记是否出错 */
DECLARE errno INT DEFAULT '0';
/** 如果出现sql异常,则将t_error设置为1后继续执行后面的操作 */
DECLARE CONTIN...
分类:
数据库 时间:
2014-05-10 09:50:37
阅读次数:
541
sql%rowcount用于记录修改的条数,就如你在sqlplus下执行delete
from之后提示已删除xx行一样,这个参数必须要在一个修改语句和commit之间放置,否则你就得不到正确的修改行数。例如:SQL> declare n
number; 2 begin 3 insert into t...
分类:
数据库 时间:
2014-05-07 17:21:07
阅读次数:
386
Subsets IGiven a set of distinct integers, S,
return all possible subsets.Note:Elements in a subset must be in non-descending
order.The solution set m...
分类:
其他好文 时间:
2014-05-07 11:13:33
阅读次数:
299
这一章我们介绍凸优化的基本概念和极大极小理论,并探讨最优解的存在性问题。
考虑如下形式的优化问题\begin{align*} \min_{\boldsymbol{x}} & \ f(\boldsymbol{x}) \\
\mbox{s.t.} & \ \boldsymbol{x} \in X....
分类:
其他好文 时间:
2014-05-07 11:09:43
阅读次数:
406
设$\phi: X \times Z \mapsto
R$是闭凸函数,其中$X$和$Z$分别是$\mathbb{R}^n$和$\mathbb{R}^m$的非空子集,考虑如下的极大极小问题:\begin{align*}\min_{\boldsymbol{x}}
& \ \sup_{\boldsym.....
分类:
其他好文 时间:
2014-05-07 11:01:55
阅读次数:
521
这篇对应的是习题39 字典, 可爱的字典
#encoding:utf-8
#列表与字典的区别
#列表
thing = ['name',1,'age','AD','sex']
print thing[1]
#print thing['name'] #会报错,列表只能通过整数去访问:TypeError: list indices must be integers, not str
stuff...
分类:
编程语言 时间:
2014-05-07 06:00:20
阅读次数:
365
Beaming NDEF Messages to Other Devices
Android Beam allows simple peer-to-peer data exchange between two Android-powered devices. The application that wants to beam data to another device must be in ...
分类:
移动开发 时间:
2014-05-06 23:21:48
阅读次数:
620
1、
??
Candy
There are N children standing in a line. Each child is assigned a rating value.
You are giving candies to these children subjected to the following requirements:
Each child must h...
分类:
其他好文 时间:
2014-05-06 22:41:02
阅读次数:
427
存储过程
一、基本语法
createproceduresp_name([proc_parameter[,...]])
[characteristic...]routine_body
begin
end
sp_name表示存储过程的名字
proc_parameter存储过程参数例表[INOUTINOUT]三个部分组成
其中IN表示传进来的参数
其中OUT表示传出去的参数
其中INOUT表示传进..
分类:
数据库 时间:
2014-05-06 20:26:10
阅读次数:
404
1(1) $\displaystyle{\lim_{x\to
0^+}\left(\frac{(1+x)^{1/x}}{e}\right)^{1/x}}$解答: \begin{eqnarray*} \lim_{x\to
0^+}\left(\frac{(1+x)^{1/x}}{e}\right)^{...
分类:
其他好文 时间:
2014-05-06 10:05:48
阅读次数:
423