MySQL Forums
Forum List  »  Newbie

Re: command rand ()
Posted by: Rick James
Date: March 18, 2015 06:17PM

The line looks like half of an INSERT statement??

Using the mysql commandline tool:

mysql> SELECT round(rand() * 1000) +1;
+-------------------------+
| round(rand() * 1000) +1 |
+-------------------------+
|                     789 |
+-------------------------+
1 row in set (0.00 sec)

mysql> SELECT round(rand() * 1000) +1;
+-------------------------+
| round(rand() * 1000) +1 |
+-------------------------+
|                     838 |
+-------------------------+

Options: ReplyQuote


Subject
Written By
Posted
March 17, 2015 08:37AM
March 18, 2015 09:01AM
Re: command rand ()
March 18, 2015 06:17PM


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.