If I make a query of the type:
SELECT nombre FROM tabla WHERE nombre LIKE '%foo%'
How could you sort / filter the result so that, for example, the results that most match " foo
" are displayed first?
For example, if you had:
" foo
",
" foooooooooo
", and
" 342457fooooooooooooooo38407632069
"
How can I make the query so that " foo
" is displayed first? (Because it is the closest result to what I have passed as input)