I think you misunderstood how this is going to work. The expression
ROUND(rand()*100) is not a constant, so it is going to re-evaluate it
and generate a *different* random number for each line in the table. Apart
from anything else, this is going to be slow because it will have to scan
the wh
Your problem, I _think_, is that your query works as follows:
for i = 0 to table_name.rows {
row <-- table_name.row[i]
if row.count = ROUND(rand() * 10) then result += row
}
NOTE: ROUND(rand() * 10) is performed FOR EACH ROW in your table. You
actually mean for it to b
I have database with table and 1 milions random characters. Key for
searching each character is a counter from 1 to milion.
when I execute statement:
SELECT count, character FROM table_name WHERE count=ROUND(rand()*10);
Example:
count ||character ||
1 dasarewr
2