View previous topic :: View next topic
|
Author |
Message |
sreenigacc
New User
Joined: 16 Oct 2007 Posts: 15 Location: bangalore
|
|
|
|
Hi All,
Could you please let me know that, Is it possible to declare the datatype(DECIMAL) in DB2 as shown below
salary decimal(5,2) or (6,2)
i) is it possible to declare ?
ii) if yes, what's the meaning of the above declaration ?
Thanks in advance
Sreenivasulu G |
|
Back to top |
|
|
guptae
Moderator
Joined: 14 Oct 2005 Posts: 1208 Location: Bangalore,India
|
|
|
|
Hi There,
Yeap u can declare
Code: |
SALARY DECIMAL(5, 2) |
it means it can store upto 5 digit 3 befor precion & 2 after precion
OR
Code: |
SALARY DECIMAL(6, 2) |
it means it can store upto 6 digit 4 befor precion & 2 after precion.
Please refer the manual for data type supportrd in DB2 |
|
Back to top |
|
|
vijikesavan
Active User
Joined: 04 Oct 2006 Posts: 118 Location: NJ, USA
|
|
|
|
Are you asking if a same column can be defined like decimal(5,2) or (6,2) ????
pls be more clear.
Thanks,
Viji |
|
Back to top |
|
|
sreenigacc
New User
Joined: 16 Oct 2007 Posts: 15 Location: bangalore
|
|
|
|
hi vijikesavan,
yes, if we declare that for a same column what does it mean?
thanks
sreeni |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
You can define it either way but NOT both! |
|
Back to top |
|
|
|