使用索引获取字段,而不是Oracle PL / SQL中的列名

问题描述 投票:0回答:1

某人知道如何通过索引访问plsql oracle游标字段。

是否可以通过索引而不是列名获取表的字段?

提前感谢。

declare
  cursor c_user is 
    select * 
      from users
     where age > 20;
begin
    for u in c_user loop
        dbms_output.put_line(u.lastname||' '||u.firstname);
    end loop; 
end;

示例

declare
  cursor c_user is 
    select * 
      from users
     where age > 20;
begin
    for u in c_user loop
        dbms_output.put_line(u.1||' '||u.2);
    end loop; 
end;
sql oracle plsql oracle10g
1个回答
0
投票
在数据库世界中,“索引”通常是指一个数据库对象,该对象存储表中的键值以及为快速检索而组织的物理位置,并且,“表”是哦,不用了,所以

“ get通过索引的表的字段“使我有些困惑,因为我认为您不是要对存储的数据进行优化查找。抱歉,如果我错了。

© www.soinside.com 2019 - 2024. All rights reserved.