tags:

views:

61

answers:

2

For any two values a and b of such type,(a<b)there always exists a c satisfying:

a<c<b
+2  A: 

decimal ( float ) type

Elzo Valugi
What if it's 0.000000000000000000000000000000000000001 and 0.000000000000000000000000000000000000002?
Ok. if you pass that level of complexity I recommend you to read about trees in the databases. here is a link http://www.slideshare.net/quipo/trees-in-the-database-advanced-data-structures?src=embed
Elzo Valugi
+1  A: 

No. Mathematically for the property to hold true, the numbers must be from an infinite domain. Decimals and floats may have a large domain but it is not infinite.

There is a simple proof by counter example, but I'll leave that as an exercise to the reader.

Yada
You are right.Is there a workaround for this?
ENUM type with just just one element. name ENUM('one'). Since there is no a and b such that a < b the property is vacuously true.
Yada