On Tuesday 29 March 2005 20:51, Scott Klarenbach wrote:
> Is there a way to represent infinity in mysql?
>
> I could make infinity default to 100,000,000 or some other number I
> know will never be reached, but it seems less elegant a solution...

probably not the best but you could have two fields:

enum value_from { inf_neg, inf_pos, number },
int from,
enum value_to { inf_neg, inf_pos, number },
int to,

And if value is "number" you try to evaluate it, otherwise you use the 
constants.

You could also use 2147483647 and -2147483648 as being less uglier (but still 
ugly) as MaxInt.

--rengolin


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to