I have a table which has only one number field: [ value NUMBER(12.0) ]
I would like to store these two types of non negative numbers.
Type A : ( a list of non negative numbers )
Type B : ( another list of non negative numbers )
I have just this one table. Without making any DML changes, is it possible for me to store both types of numbers, with some distinction..
I thought of using sign to differentiate , but it will fail in case of 0..
Thanks,
Trinity
You can store either
aor~b. This fixes the problem with zero because ~0 is -1.The expression
~bmeans the bitwise not of b and is equivalent to-b - 1.However I would strongly advise you to change the schema if it is at all possible. This hack could turn out to be a maintenance nightmare for whoever has to take over the system after you.