3 ms·
Reminds me of a "real world" web language shootout I once read, which included accessing a database populated with a large dataset. The author used a query alo
by randomdata 9y ago
Reminds me of a "real world" web language shootout I once read, which included accessing a database populated with a large dataset.
The author used a query along the lines of:
SELECT * FROM table ORDER BY RAND() LIMIT 1
Except for the language they wanted to win, which was basically written like:
SELECT * FROM table WHERE id = RAND()
Which, of course, resulted in it their favorite being the clear winner.