All pastes #578990 Raw Edit

Two-Bits

public sql v1 · immutable
·published 2007-06-20 13:46 UTC
rendered paste body
select id, category from table1 where id in(	select id from 	(		(select 1 as usort, id from table1 where id in (6, 9))		UNION		(select 2 as usort, id from table1 order by priority) ORDER BY usort	)	group by category)