mysql> select * from category order by rand();


mysql> select * from category order by rand() limit 5 ;

+-------------+-------------+---------------------+

| category_id | name        | last_update         |

+-------------+-------------+---------------------+

|           6 | Documentary | 2006-02-15 04:46:27 |

|           1 | Action      | 2006-02-15 04:46:27 |

|          13 | New         | 2006-02-15 04:46:27 |

|           2 | Animation   | 2006-02-15 04:46:27 |

|          11 | Horror      | 2006-02-15 04:46:27 |

+-------------+-------------+---------------------+

5 rows in set (0.00 sec)


mysql> select * from category order by rand() limit 5 ;

+-------------+-----------+---------------------+

| category_id | name      | last_update         |

+-------------+-----------+---------------------+

|          16 | Travel    | 2006-02-15 04:46:27 |

|          15 | Sports    | 2006-02-15 04:46:27 |

|          13 | New       | 2006-02-15 04:46:27 |

|           2 | Animation | 2006-02-15 04:46:27 |

|           7 | Drama     | 2006-02-15 04:46:27 |

+-------------+-----------+---------------------+

5 rows in set (0.00 sec)


mysql>