4
I have a table where I have the student’s name and his score, I need to pick up 5 random students and display them in ascending order of the score.
I tried to do it this way, but he’s just randomly bringing in the students and he’s not ordering the scores:
SELECT * FROM `aluno` ORDER BY RAND() , `AlunoPontos` ASC LIMIT 0 , 5
Does anyone know how I can do this kind of consultation ?
Thank you.
Here is the answer to the question: http://answall.com/questions/108571/select-rand%C3%B4mico-com-sqlserver-mssql/108575#108575
– Andre Mesquita
It’s either random or ascendant :P
– rray
Take a look at this -> http://stackoverflow.com/questions/4329396/mysql-select-10-random-rows-from-600k-rows-fast
– Thomas Lima
You managed to solve the problem?
– Marco Aurélio Deleu
I haven’t made it yet, @Marcoauroéliodeleu
– Carlos Ferreira