Job Seekers   Employers
dbapool: Authors | Submissions | Contact Us
   Forgot password? | Sign up
  Home   Discussion Forum   Articles   Interview Questions   FAQs   Scripts   Rewards   Analyzer   White Papers   Blog   Certification   Downloads   Tools
 

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.



  


 Title: Declare variable
 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

  




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 Khokhar857
  Mohammed Taj746
  positive fanatic483
  Jayanta Sur479
  Vigyan Kaushik386
  Vinoth Kumar357
  Gopu Gopi340
  Gitesh Trivedi322
  neeraj sharma258
  Ramesh Jois246






oracle Mag



  About Us Advertise Terms of Use Privacy Newsletters Contact Us    

Home   Discussion Forum   FAQs  Articles  Jobs   Newsletters  Directory  Downloads 

Our Premium Sponsor
Confio Software