Obtener el nombre de un parámetro
Frecuentes
Visto 1,184 veces
5
I want to get a parameter's name in plsql.
Por ejemplo, los servicios administrativos de
procedure sp_example(myParam in varchar2) is
paramName varchar2(30);
begin
paramName = 'myParam';
end
end procedure sp_example;
Is there a way to get the name of myParam
using reflection, instead of hard coding it?
2 Respuestas
6
Tratar:
select argument_name from all_arguments where object_name = 'SP_EXAMPLE';
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.
Respondido 29 ago 12, 00:08
1
If you want to get the names of parameters retrieved in their respective positions, use
select argument_name from user_arguments where object_name='SAMPLE_PROC' order by position;
Respondido 29 ago 12, 19:08
No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas reflection plsql or haz tu propia pregunta.
Puedes usar
OWA_UTIL.who_called_me
ywho_am_i
procedure to dynamically get the procedure owner and name. But unfortunately there's no easy way to get the name of the procedure within a package. tkyte.blogspot.com/2009/10/… - jon heller