Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Database > Oracle
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Oracle General Oracle database discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Oracle section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old February 12th, 2005, 02:10 PM
Registered User
 
Join Date: Jan 2005
Location: hyd, a.p, India.
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default bind variable

hi oracle lovers,
i want to know what is bind variable and how does it
improves query performence.
select ename from emp where empno= :num;
compiled
now i execute with by giving 7369 and i get the answer.
now i give 7444 ,i get the result ,but how does
oracle make it as soft parse instead of hard parse
while the two queries differ in the semantic structure.
select ename from emp where empno= 7369;
select ename from emp where empno=7444;

thr
  #2 (permalink)  
Old February 15th, 2005, 05:32 AM
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
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ASSIGNING A JAVA SCRIPT VARIABLE TO A XSL VARIABLE SOMANATHAN10 XSLT 1 February 21st, 2007 04:26 AM
Bind a Label cp75 ASP.NET 1.0 and 1.1 Basics 19 January 10th, 2007 10:53 AM
Grid Bind msbsam ASP.NET 2.0 Basics 1 December 19th, 2006 07:03 AM
explain plan with bind variable ramanadyv SQL Language 0 March 2nd, 2006 05:06 AM
how to bind a data() lsxx Classic ASP Components 4 April 20th, 2005 02:35 AM



All times are GMT -4. The time now is 06:03 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.