获取参数名称 [英] Get a parameter's name
本文介绍了获取参数名称的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在plsql中获取参数的名称.
I want to get a parameter's name in plsql.
例如,
procedure sp_example(myParam in varchar2) is
paramName varchar2(30);
begin
paramName = 'myParam';
end
end procedure sp_example;
有没有一种方法可以使用反射来获取myParam
的名称,而不是对其进行硬编码?
Is there a way to get the name of myParam
using reflection, instead of hard coding it?
推荐答案
尝试:
select argument_name from all_arguments where object_name = 'SP_EXAMPLE';
此视图还可以显示数据类型,位置等,并且可以在SQL或PL/SQL中使用它.各种元数据视图中的大量信息.
This view can also show you the data types, positions, etc., and you can use it in SQL or PL/SQL. Plenty of info in the various metadata views.
这篇关于获取参数名称的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文