+ Reply to Thread
Results 1 to 2 of 2




  

Thread: Exactly process of Rand() function in MySQL

      
  1. #1
    I'm New! eBiz is on a distinguished road
    Join Date
    August 3, 2011
    Posts
    4
    Rep Power
    0
    Feedback Score
    0

    Default Exactly process of Rand() function in MySQL

    Does anyone know, what is the exactly process of Rand() function in MySQL.

    I see a lot of people are trying to do a random row with some other method.

    How much does it improve performance, Compared with "ORDER BY RAND()" methods?


  2. #2
    I'm New! Florinda is on a distinguished road
    Join Date
    July 8, 2011
    Posts
    39
    Rep Power
    1
    Feedback Score
    0

    Default Re: Exactly process of Rand() function in MySQL

    SELECT * FROM my_table ORDER BY RAND() LIMIT 1;
    This query returns a random row from the table my_table, no matter how many rows there are and no matter if the id is a continuous sequence of numbers or not. With this query you are sure you get a random row every single time.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. What is the function of Keyword.txt?
    By hooda in forum SEO Forum
    Replies: 6
    Last Post: Aug 2nd, 2011, 8:28 pm
  2. PHP mail() function
    By GordyMac in forum Programming
    Replies: 3
    Last Post: Feb 27th, 2009, 1:56 pm
  3. PHP pagerank function, where to get?
    By warj in forum Programming
    Replies: 2
    Last Post: Nov 24th, 2008, 12:59 pm
  4. Rand attacks Aviva
    By Manish Pandey in forum Directories
    Replies: 8
    Last Post: Aug 8th, 2007, 12:21 pm

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
WebTalkForums
WebTalkForums
Recent Forum Threads