Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Find bind variable names on a given sql statement?

AllenS.Nov 6 2020

Hi,
Does oracle provide a package/function/procedure that derives the bind variable names of a given query?
For ex: select * from per_people_x where person_id = :person_id or first_name = :first_name
In the example query above, I'm expecting both person_id and first_name as bind variable names to be returned.
I looked at the view V$SQL_BIND_CAPTURE but it seems only queries that have been executed are listed here. In my case, I haven't executed the query.
This is something similar to what the SqlDeveloper tool does when running a query like this where it pops up a window asking the user to enter values for all bind variables available in the query.
Appreciate any help.

Comments
Post Details
Added on Nov 6 2020
2 comments
916 views