Home » SQL & PL/SQL » SQL & PL/SQL » about variable
about variable [message #250513] Tue, 10 July 2007 05:52 Go to next message
p.bhaskar
Messages: 33
Registered: February 2007
Location: kolkata
Member
can anyone tell me what is the difference between using variables of these two types in a query?

:ab and &ab
Re: about variable [message #250520 is a reply to message #250513] Tue, 10 July 2007 06:05 Go to previous messageGo to next message
Michel Cadot
Messages: 64111
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
":" is a bind variable, that is a memory place to communicate between SQL*Plus and Oracle server.
"&" is a SQL*PLus variable, that is it contains a value that is substitute to the variable when sending to the server.

For instance:
"select * from mytable where mycol = :ab"
send this string to the server and then the value for the variable

"select * from mytable where mycol = &ab"
SQL*Plus replaces &ab by itsvalue and then send the query to the server.

Regards
Michel


Re: about variable [message #250524 is a reply to message #250513] Tue, 10 July 2007 06:13 Go to previous message
p.bhaskar
Messages: 33
Registered: February 2007
Location: kolkata
Member
thanx
Previous Topic: Guidence
Next Topic: Need Help on Oracle Function
Goto Forum:
  


Current Time: Tue Dec 06 00:07:13 CST 2016

Total time taken to generate the page: 0.28400 seconds