Difference between Test window an anonymous block in SQL window?

ward

Member
I use the Test window all the time - great tool. Its bind variables implementation makes things very easy to test. How does PL/SQL Developer pass those values in? Checking V$SQLAREA it does not execute a SQL statement to assign the bind variables, so how does it do it? Running the same query in a SQL window or command window means assigning the value somehow, which always generates a new statement in the shared pool for each value assigned, but testing the same code in a Test window reuses the same parsed statement for different values (the whole point of bind variables). I guess I don't really understand what a Test window really is and how it differs from an anon block in a SQL window. Thanks!
 
The use of bind variables is a standard Oracle concept. You can send a SQL statement (or PL/SQL Block) to the server with bind variables included as is (:bindvar), and explicitly declare and set the variables when the statement is sent. The Oracle Server will reuse a previously parsed representation of this statement if the SQL text is exactly the same.
 
What is the difference between a "Test window" and a "SQL window" (containing an anonymous block) in PL/SQL Developer?
 
Back
Top