SyntaxFix
Write A Post
Hire A Developer
Questions
SELECT id, 1 AS sort_order FROM b UNION SELECT id, 2 AS sort_order FROM a MINUS SELECT id, 2 AS sort_order FROM b ORDER BY 2;