[Solved] what the meaning of this code in sql? i found this code in oracle apex and that says that query for data change history


select xxpst_util_pkg.get_type_id_by_code  ('CHANGE_REQUEST', 'MILESTONE_DUE_DATE_CHANGE') comment_type_id
      from dual

is a mean of calling a PLSQL function from a SQL statement. DUAL returns a single row, so it just yields the output of the function. It’s not dissimilar from doing

my_variable := xxpst_util_pkg.get_type_id_by_code  ('CHANGE_REQUEST', 'MILESTONE_DUE_DATE_CHANGE')

In terms of what comes back, you’d need to look in the source code for that package. You can see that via a tool like SQL Developer, or you could do:

select text
from   all_source
where  name = upper('xxpst_util_pkg')
order by type, line

As a guess, it is probably a wrapper routine to do some simple queries to a reference table, but the source code will give you the answer.

solved what the meaning of this code in sql? i found this code in oracle apex and that says that query for data change history