I have table called \"users\" and need to select 2 rows before and after specific row, sorted by users.score ASC
users table (structure):
id name
Perhaps using union all
union all
( select * from users where id < 5 order by score limit 2 ) union all ( select * from users where id > 5 order by score limit 2 )