Dynamic plsql中的动态%rowtype变量
如何创建动态%rowtype变量Dynamic plsql中的动态%rowtype变量,dynamic,plsql,sql-types,rowtype,Dynamic,Plsql,Sql Types,Rowtype,如何创建动态%rowtype变量 table_name varchar2 (300) type varchar2_tab IS table of table_name%rowtype; 不能对变量使用%rowtype。必须使用实际的表名或光标。这与指定记录类型相同,记录类型的成员对应于表的每一列 customer customers%rowtype; 如果你想要的只是一张VARCHAR2表,那就做吧 type varchar2_tab is table of varchar2(32767);
table_name varchar2 (300)
type varchar2_tab IS table of table_name%rowtype;
不能对变量使用%rowtype。必须使用实际的表名或光标。这与指定记录类型相同,记录类型的成员对应于表的每一列
customer customers%rowtype;
如果你想要的只是一张VARCHAR2表,那就做吧
type varchar2_tab is table of varchar2(32767);
当Oracle看到第一条语句时
table_name varchar2 (300);
它认为
table\u name
是varchar2
类型的变量,不认为是table 请注意:但是您可以在游标上创建%rowtype变量。%rowtype
由编译器计算,而不是由运行时引擎计算。