Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Using variables in Oracle

612328Dec 6 2007 — edited Dec 10 2007
Hi,

I am using java and oracle and I want to know the way to achieve the "user-defined variables" functionality of mysql
[http://dev.mysql.com/doc/refman/4.1/en/user-variables.html]

Basically I want my update query/PL-SQL block to first define a variable and then refer it multiple times in the query.I also want to return the number of updated rows to my application code in java

I saw DEFINE variable,bind variables etc,but dont know what exactly should I use

Thanks in advance
Ananth
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 7 2008
Added on Dec 6 2007
8 comments
864 views