Topic: SQL*Plus and PL/SQL >> Declare variable
|
Disclaimer: The purpose of all dbapool forums including OCP and Other Oracle Certification forums is to help each other with specific issues but not to share dump and copyrighted exam content, materials or intellectual property.
You may review the entire Oracle Certification Program Candidate Agreement online Here.
|
|
|
|
| Navi |
Posted: Jul 22, 2007 11:40:21 AM |
Total Post: 60
Joined: Jun, 2007
|
Hi,
First i like to Thank all the users for helping me for clarifying my doubts,it has helped me a lot.
Here i am with one more question:-
In java if we want to decalre a variable and print that variable value we will do as below:-
int number=101;
System.out.println(number);
But how we need to do that one in oracle?
Even though it seems to be a simple question it matters a lot for me. Please help me.
Regards,
Naveen
|
|
|
Muks |
| Posted: Jul 23, 2007 01:51:42 AM | |
|
Total Post: 47
Joined: Jan, 2007
|
you use dbms_output.put_line(variablename);
|
|
|
|
|
Dipu |
| Posted: Jul 23, 2007 07:44:09 AM | |
|
Total Post: 8
Joined: Nov, 2006
|
Hi Mukta,
I wanted to add one more point in this juncture is that we can do it by using bind variable also like.
SQL> variable x number
SQl>
Declare
z number;
begin
z := 10;
:x := z;
end;
/
SQL> print x;
Thanks & Regards,
Diptendu.
|
|
|
|
|
Muks |
| Posted: Jul 27, 2007 06:05:23 AM | |
|
Total Post: 47
Joined: Jan, 2007
|
hi,
yes, exactly...only the approach is diffirent
Regards,
Mukta
|
|
|
|
|
| Time Zone: EDT |
Send this thread to your friend |
|
|
|
|
Forum Rules & Description
Who Can Read The Forum? Any registered user or guest
Who Can Post New Topics? Any registered user
Who Can Post Replies? Any registered user
|
| |
Get FREE Magazines
|
Top 10 Forum User
|
| Murtuja Khokhar | 857 |
| Mohammed Taj | 746 |
| positive fanatic | 483 |
| Jayanta Sur | 479 |
| Vigyan Kaushik | 386 |
| Vinoth Kumar | 357 |
| Gopu Gopi | 340 |
| Gitesh Trivedi | 322 |
| neeraj sharma | 258 |
| Ramesh Jois | 246 |
|
|