MySQL Forums
Forum List  »  Newbie

Random UNSIGNED BIGINT?
Posted by: hmurphy
Date: August 10, 2005 03:03PM

I am trying to generate a random UNSIGNED BIGINT. The best approach I can find is to use rand() to generate a floating point number, then multiply it by the maximum value attainable by a BIGINT. Not perfect, but probably good enough. However, I cannot find any reference to a constant that represents the maximum value of *ANY* numeric type! I cannot accept that MySQL doesn't provide a MAX_BIGINT type constant; can someone point me in the right direction?

Thank you for your time,

Hunter

Options: ReplyQuote


Subject
Written By
Posted
Random UNSIGNED BIGINT?
August 10, 2005 03:03PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.