I have a query
select * from myTable
…and I want to wrap this query inside a stored procedure, and have the store procedure output the results of this query.
How do I do it?
In ms-sql, i can store my query as a string to a string variable. And then do “Execute (variable)”. Why no such thing in Oracle?
Use:
Use this if you want to run dynamic SQL on Oracle:
If you want to include bind variables in the dynamic SQL: