SyntaxFix
Write A Post
Hire A Developer
Questions
Order By is applied after union, so just add an order by clause at the end of the statements:
Order By
union
order by
Select id,name,age From Student Where age < 15 Union Select id,name,age From Student Where Name like '%a%' Order By name