Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Random number as Default Value

Status
Not open for further replies.

crjo

Programmer
Jul 3, 2001
15
US
Converting Access 2K db to MySQL, have field with default value set to display 4-digit random number:
=Int(Rnd()*9999)
How can I convert this to MySQL?
 
You can't. Mysql does only allow constants as default values.

Generate the random value in your application before insertion.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top