Thread: bind variable
View Single Post
 
Old February 15th, 2005, 05:32 AM
sujit sujit is offline
Authorized User
 
Join Date: Dec 2004
Location: , , India.
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Default

See the example below,


-----LATE BINDING
declare
account_id VARCHAR(14) := 'CA6800003132';
begin
delete from sujit_test where account_id = account_id;
end;

---all the rows will be deleted


-----FAST BINDING
declare
account_id VARCHAR(14) := 'CA6800003132';
begin
EXECUTE IMMEDIATE 'delete from sujit_test where account_id = :1' USING account_id;
end;

---only that row(s) CA6800003132 will be deleted.


  In Late Binding the Value is assigned to the variable at the run-time whereas In Fast Binding the value is assigned at the compile time.

Sujit

Sujit Ku. Mahapatra