我有如下代码:
CURSOR data_cur(username VARCHAR2)
IS
SELECT user_name as username,pass_word as password
from User
where user_name=username;
OPEN data_cur(username);
FETCH data_cur INTO data_rec;
IF data_cur%NOTFOUND
THEN
vs_return := NULL;
END IF;
现在,一旦将数据复制到 data_rec 中,有什么方法可以让我获得类似的值data_rec.get(password);
而且我的函数声明是 getUserProperty(username, property).. 现在假设我有很多来自 select 查询的列,那么我怎么能返回一些data_rec.get(property)而没有像data_rec.password这样的硬编码