I have a table which looks like that:
id: primary key content: varchar weight: int
What I want to do is randomly select one row from this t
I don't remember how to RND() in mysql, but here working example for MSSQL:
SELECT TOP(1) (weight +RAND ()) r, id, content, weight FROM Table ORDER BY 1 DESC
If TOP(1) is not applicable you just fetch first record from total result set.