@NogDogOct 15.2021 — #Only way that pops to mind is to add an additional case column to the select: [code=sql] select *, -- or list specific columns you want case when last_name = 'SMITH' then 0 -- adjust upper-/lower-case as needed else 1 end as name_sort from the_table order by name_sort, last_name, first_name [/code]
@NogDogOct 15.2021 — #@boohoo#1638202 Cool, just tried (something like) it in PostgreSQL to confirm it supports that sort of thing, too: [code=sql] select predicate_type_id from some_schema.predicate_type order by mod(predicate_type_id, 2), predicate_type_id [/code] [code=text] OUTPUT: 4 6 8 10 12 14 16 1 7 9 11 13 15 17 [/code]