May 18, 2005

  • Random Rows in SQL

    At least in MySQL, all you have to do to return random data from your query is add ORDER BY RAND() to your query, for instance: SELECT * FROM table ORDER BY RAND() LIMIT 1…