| sathish |
Posted: Dec 26, 2006 03:41:25 AM |
Total Post: 47
Joined: Mar, 2006
|
wat is maximum value possible in this
declaration number(2,2)
i have tried to insert the follwoing values ....
any on explain me.
values output
1 N
12 N
123 N
1234 N
0.1 Y
0.12 Y
.
.
.
0.123456789 Y
Here N - error
Y - successfully inserted
|
|
|
maddy |
| Posted: Dec 26, 2006 06:23:07 AM | |
|
Total Post: 18
Joined: Aug, 2006
|
u can only insert decimal values
ie.. u declared 2 has the scale and 2 has the precision and it says that it can hold 2 numbers and both must be of precision and it does not hold any scale value and it holds n number of values after decimal becoz it rounds of the value....
|
|
|
|
|
maddy |
| Posted: Dec 26, 2006 06:23:21 AM | |
|
Total Post: 18
Joined: Aug, 2006
|
u can only insert decimal values
ie.. u declared 2 has the scale and 2 has the precision and it says that it can hold 2 numbers and both must be of precision and it does not hold any scale value and it holds n number of values after decimal becoz it rounds of the value....
|
|
|
|
|
sathish |
| Posted: Dec 26, 2006 10:03:26 PM | |
|
Total Post: 47
Joined: Mar, 2006
|
Anyone explain
Briefly with some other example.
|
|
|
|
|
mampi |
| Posted: Dec 28, 2006 05:52:35 AM | |
|
Total Post: 3
Joined: Dec, 2006
|
suppose u give number(4,2).
then if u wanna insert 1234.23 it 'll give an error.because there should be 2 nos before decimal and 2 nos afterit.
but if u insert 25.356 it will insert the value and it'll be stored as 25.36 i.e. it is round of.u give as 10 no s after decimal it'll not show any error.but it will store ultimately only 2 values.clear!
|
|
|
|
|
| Time Zone: EDT |
Send this thread to your friend |