oracle中的强和弱ref_cursor之间的差异 [英] Difference between strong and weak ref_cursor in oracle

查看:214
本文介绍了oracle中的强和弱ref_cursor之间的差异的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道强和弱之间的实际差异 ref cursor

I want to know the practical difference between strong and weak ref cursor.

ref_cursor 将始终使用返回值,并且编译器知道编译期间的结构,但是在弱的 ref cursor 一个值和编译器不知道在编译时的结构。

Strong ref_cursor will always use to return a value and compiler know the structure during the compile time, but in the weak ref cursor it will not return a value and compiler dosen't know the structure during the compile time.

这是基本的区别,但我的问题是什么值将返回的强<$ c

This is the basic difference but my question is what value will be returned by the strong ref cursor and where that returned value will be used.

推荐答案

强类型引用游标总是返回一个已知的类型,通常来自一个声明的TYPE对象。编译器可以通过比较返回的类型来查找PL / SQL块中的问题。

A strongly typed ref cursor always returns a known type, usually from a declared TYPE object. The compiler can find problems in a PL/SQL block by comparing the types returned to how they are used.

弱类型的ref游标有一个返回类型,依赖于它执行的SQL语句,即只有一旦游标打开是已知的类型(在运行时)。编译器在运行之前无法确定类型,因此必须注意确保正确处理游标结果集,以避免运行时错误。

A weakly typed ref cursor has a return type that is dependant on the SQL statement it executes, i.e. only once the cursor is opened is the type known (at runtime). The compiler cannot determine the types until it is ran, so care must be taken to ensure that the cursor result set is handled properly to avoid runtime errors.

这篇关于oracle中的强和弱ref_cursor之间的差异的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆