Posts

Showing posts with the label arguments

Identifying functions and procedures without arguments

I wanted to find a report on all procedures in my schema, that accepted zero arguments. There are two views that are useful here: USER_PROCEDURES USER_ARGUMENTS With USER_PROCEDURES, if the row is referring to a subprogram in a packaged, object_name is the package name, and procedure_name is the name of the subprogram. With any other subprogram out of the context of a package, the object_name is the name of the subprogram and procedure_name returns NULL. With user_argument, object_name becomes the name of the subprogram, with package_name being NULL when you are not dealing with a package's subprogram.  In the case of subprograms out of the package context, no rows are returned in the user_arguments  view. That differs from a subprogram in a package - you get a row, but argument_name is set to NULL. You will never get a NULL argument if there is at least one argument. In the case of functions, you will get an additional argument with argument_name set to NU...