store procedure: sql a cursor with the name 'xxx_cursor' already exists
来源:互联网 发布:java 环形链表 编辑:程序博客网 时间:2024/06/05 15:29
DECLARE test_cursor CURSOR FOR --> DECLAREtest_cursor CURSOR LOCAL FOR
SELECT test_id FROM test_table
OPEN test_cursor
FETCH NEXT FROM test_cursor INTO @id
WHILE @@FETCH_STATUS = 0
EXEC (@v_sql)
FETCH NEXT FROM test_cursor INTO @id
CLOSE test_cursor
DEALLOCATE test_cursor
GO
---------------------------------------------------------------------
LOCAL
指定该游标的范围对在其中创建它的批处理、存储过程或触发器是局部的。 该游标名称仅在这个作用域内有效。 在批处理、存储过程、触发器或存储过程 OUTPUT 参数中,该游标可由局部游标变量引用。OUTPUT 参数用于将局部游标传递回调用批处理、存储过程或触发器,它们可在存储过程终止后给游标变量分配参数使其引用游标。除非 OUTPUT 参数将游标传递回来,否则游标将在批处理、存储过程或触发器终止时隐式释放。如果 OUTPUT 参数将游标传递回来,则游标在最后引用它的变量释放或离开作用域时释放。
指定该游标的作用域对来说连接是全局的。 在由连接执行的任何存储过程或批处理中,都可以引用该游标名称。 该游标仅在断开连接时隐式释放。
如果 GLOBAL 和 LOCAL 参数都未指定,则默认值由 default to local cursor 数据库选项的设置控制。
- store procedure: sql a cursor with the name 'xxx_cursor' already exists
- A project with that name already exists in the workspace
- A project with that name already exists in the workspace(小常识)
- 解决安装mysql的”A Windows service with the name MySQL already exists.“问题
- A Windows service with the name MySQL already exists安装数据库出错
- A 'Android Application' configuration with this name already exists
- Error : A project already exists with this name.
- eclipse 从svn导入项目 报错A project with that name already exists in the workspace
- A composition unit with name **** already exists. Select a different application name.
- JBWEB000250: Child container with name already exists
- Another resource already exists with name
- Ehcache依赖版本问题:Another CacheManager with same name 'es' already exists in the same VM.
- Eclipse中提示A 'Java Application' configuration with this name already exists解决方案
- This platform could not be created because a solution platform of the same name already exists.
- Cannot determine whether a queue with the specified format name exists.
- A new node couldn't be inserted because one with the same name exists. (VERR_CFGM_NODE_EXISTS)
- JSP 开发之THE SERVLET NAME ALREADY EXISTS.解决方法
- This platform could not be created because a solution platform of the same name already exists解决方法
- awk
- 高级套接口-(sendmsg和recvmsg)
- Appium - Android windows测试环境搭建
- idea 14(or maven) 未结束字符串字面值 非法的表达式开始
- 读《从技术走向管理》感悟
- store procedure: sql a cursor with the name 'xxx_cursor' already exists
- MSDN,我告诉你
- 淘宝海量数据库之八-攻克随机IO难关
- 高光谱解混学习笔记(一)------概述
- Android EventBus实战
- DOS下的加减运算
- 理解JavaScript中的事件路由冒泡过程及委托代理机制
- mysql日志打印
- 用R画有图例的中国地图