Use of the Rand function to extract some random records from a database.
SELECT * FROM tabella WHERE ID = (rand() * (SELECT MAX(ID) FROM [myTable]))
Download code...
Print this page