码迷,mamicode.com
首页 >  
搜索关键字:declare    ( 3361个结果
mysql 查找树状子节点函数
CREATE FUNCTION getChildList(rootId INT) RETURNS varchar(1000) BEGIN DECLARE sChildList VARCHAR(1000); DECLARE sChildTemp VARCHAR(1000); SET sChildTem...
分类:数据库   时间:2014-10-22 17:45:04    阅读次数:195
xml文件导入 sql数据库
xml DECLARE @h int -- 定义xml句柄DECLARE @doc x...
分类:数据库   时间:2014-10-21 19:18:38    阅读次数:265
SQLServer在多个表中都增加一个字段的方法
1、使用游标declare @sql varchar(200), @name varchar(40)declare my_cursor scroll cursor for select name from sysobjects where type = 'u' and name like 'j...
分类:数据库   时间:2014-10-21 13:43:42    阅读次数:209
PLSQL中显示Cursor、隐示Cursor、动态Ref Cursor区别
一、显式cursor 显式是相对与隐式cursor而言的,就是有一个明确的声明的cursor。显式游标的声明类似如下(详细的语法参加plsql ref doc ): cursor cursor_name (parameter list) is select ... 游标从declare、open、fetch、close是一个完整的生命旅程。当然了一个这样的游标是可以被多次open...
分类:数据库   时间:2014-10-21 12:16:47    阅读次数:305
oracle 写declare例子
注意:1.赋值要用 :=2.或的关系用 or 表示declare prefix VARCHAR2(2); --前缀 res_value VARCHAR2(20);begin prefix := 'QZ'; for i in (select col1,col2 from table_name ...
分类:数据库   时间:2014-10-21 00:43:29    阅读次数:554
还原数据库出现“未获得排他访问”解决方法(杀死数据库连接的存储过程sqlserver)
在master数据库下创建存储过程如下: createproc killspid (@dbnamevarchar(20)) as begin declare@sqlnvarchar(500) declare@spidint set@sql='declare getspid cursor for select spid from sysprocesses where dbid i...
分类:数据库   时间:2014-10-20 23:27:07    阅读次数:355
[RK_2014_1020]Cannot declare member function ‘static int Foo::bar()’ to have static linkage
1.if you declare a method to be static in your .cc file.The reason is thatstaticmeans something different inside .cc files than in class declarations ...
分类:其他好文   时间:2014-10-20 19:24:37    阅读次数:223
sql里将重复行数据合并为一行,数据用逗号分隔
1 一.定义表变量 2 3 DECLARE @T1 table 4 ( 5 UserID int , 6 UserName nvarchar(50), 7 CityName nvarchar(50) 8 ); 9 10 insert into @T1 (UserID,UserName,City...
分类:数据库   时间:2014-10-20 16:38:25    阅读次数:198
SQL Server 数据库游标选项
背景: 游标控制服务器端游标的行为,相关的T-SQL如下: declare , open , fetch , close , deallocate。1、 cursor_close_on_commit{on | off}; 如果设置为on 在事务提交时或回滚时会关闭打开的游标, 如果设置为...
分类:数据库   时间:2014-10-20 13:26:26    阅读次数:150
将所有 UNUSABLE 状态的 index 修复
-- 请以 DBA 权限登录,并执行-- 将所有 UNUSABLE 状态的 index 修复, rebuild 一下即可declare -- 指向所有 UNUSABLE 状态的 index 的游标 cursor c is select index_name, owner from dba_ind.....
分类:其他好文   时间:2014-10-19 21:20:08    阅读次数:163
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!