Mysql
 sql >> Database >  >> RDS >> Mysql

MySQL:Ordina per like?

order by case 
    when name LIKE "%John%" then 1 
    when name LIKE "%Doe%"  then 2 
    else 3 
end