This is what I came up with to float ‘default’ to the top and sort the rest:
SELECT 'default' AS name, 'AAA' AS tag
UNION
SELECT name, name AS tag
FROM (SELECT DISTINCT TOP (100) PERCENT name
FROM AccountManager
WHERE (name <> 'default')
ORDER BY name) AS derivedtbl_1
ORDER BY tag
Is there a less complicated/better way?
NB:
would fail with
ORDER BY items must appear in the select list if SELECT DISTINCT is specified.hence use ofGROUP BY