Home » SQL & PL/SQL » SQL & PL/SQL » variable declaration
variable declaration [message #188823] Mon, 21 August 2006 21:56 Go to next message
arunmenonus
Messages: 2
Registered: August 2006
Location: pune
Junior Member
Dear All,

i am very new to PL/SQL, I need to declare 8 variables with the same data type varchar2(20)

whether i can declare it in one line like in c language

Int a,b,c,d

thanks in advance

arun k





Re: variable declaration [message #188836 is a reply to message #188823] Tue, 22 August 2006 00:43 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
arunmenonus wrote on Tue, 22 August 2006 04:56

i am very new to PL/SQL


Then why post in the expert forum?
The answer is quite simple: test it. If you want to learn pl/sql, or any programming language actually, the best way to learn it is to try, try, try, then search the documentation (see first post in forum for links) and if all that fails, THEN ask.
If you ask and we provide you with the answer, you'd know it now, but if you got to an answer yourself you will remember it the rest of your career.
Re: variable declaration [message #189272 is a reply to message #188823] Wed, 23 August 2006 23:41 Go to previous messageGo to next message
arunmenonus
Messages: 2
Registered: August 2006
Location: pune
Junior Member
dear all

With respect to the advice from Frank

i have checked with all the combinations and also i have checked in many sites but i have not found anyone declared variables like i requested.

and also i read in ORACLE PL/SQL By Scott Urman. in that he has mentioned that only one variable can declare in one line. is it true?
even our dba also saying Not possible

regards

Arun
Re: variable declaration [message #189281 is a reply to message #189272] Thu, 24 August 2006 00:26 Go to previous message
Frank
Messages: 7880
Registered: March 2000
Senior Member
Quote:

in that he has mentioned that only one variable can declare in one line. is it true?

You found a book by a well respected author explicitly stating it is not possible. You searched the internet and found no trace of it being possible. You tested it yourself and found it was not possible.
What makes you think it would be possible?
(hint: it is NOT possible)
Previous Topic: CONNECT BY - Having root node displayed in every row
Next Topic: Problem with XMLROOT (Merged)
Goto Forum:
  


Current Time: Tue Dec 06 00:16:37 CST 2016

Total time taken to generate the page: 0.11027 seconds