QAds
Apple iPad 64gb Wi-Fi 3G
$0.78
Apple iPod nano 8 GB Pembe
$87.91
Toshiba Satellite T115D-S1125 LED TruBrite Laptop
$360.00
Motorola RIZR Z8 Ferrari Quad-Band, 2 MP Camera, MP3 Player and MicroSD Slot
$194.99
:: HOME » MySQL » RAND function - Random Data
 
RAND function - Random Data

How to query random data row by MySQL:

SELECT * FROM table_name ORDER BY RAND() LIMIT 1;

To be able to get random row or rows from database you just need to use RAND() at ORDER BY and after that determine the how many rows you want to get by using LIMIT.


MySQL RAND function - Random Data MySQL RAND function - Random Data MySQL RAND function - Random Data
MySQL RAND function - Random Data
NEW QUESTION
 
Your E-Mail Address
»
Your e-mail will never be shown!  
   
 
Question
»
Please type your question and please use [CODE] tag for your codes!  
  Add CODE Quote BOLD ITALIC Underline Align Left Align Center Align Right Add Line  
   
 
Human Check
»
Enter human check code below!  
   
 
       
 
* Your Question will be answered as soon as possible, probably within 24 hours!
MySQL RAND function - Random Data MySQL RAND function - Random Data MySQL RAND function - Random Data
MySQL RAND function - Random Data
 
mc sinema sudoku