Why null values are not ranking same in mysql?
问题 Yesterday I asked a question about ranking students by their points. [Rank users in mysql by their points ] I actually solved my problem with the help I've recieved from other question (thanks to everyone who helped me). Meanwhile I figured out something accidently. If I try to rank my students by their points and if points column was empty (NULL) my query didn't gave an error also it sorted ranks like 1-2-3-4 but all values were NULL this is the query I've tried select er.*, (@rank := if(