Integer

Tools & Utilities
Enthusiast

Integer

Hi
I have some doubts over integer formats...

I created 3 tables and ran similar set of queries
1)create table table1(a integer format '-(10)9')
insert into table1 values(123456)
sel a (char(6)) from table1;
output=1

2)create table table2(a integer format '-9(10)')
insert into table2 values(123456)
sel a (char(6)) from table2;
output=00001

3)create table table3(a integer format '(10)9')
insert into table3 values(123456)
sel a (char(6)) from table3;
output=000012

I am not able to understand why different outputs are coming
and more precisely how signed/unsigned is handled here...

also what is the differenece between '-9(10)' & '-(10)9'