An application must use this method if the dynamic SQL statement meets any of the following criteria:
It returns data.
It contains placeholders for values to be supplied at execution time, represented by a question mark (?) character in the text of the statement.
An application should use this method if it will execute the statement multiple times because it incurs the overhead associated with statement preparation only when it first prepares the statement. Each subsequent execution of the statement does not incur the cost of recompiling the statement.
The prepare-and-execute method offers the following advantages over the execute-immediate method:
select statements can be executed.
Performance is better when statements are executed more than once.
The statement can take parameters whose values can change each time the statement executes.