Wednesday, April 10, 2013

How to order by the result of multiple union select statement

Question : 
How to order by the result of multiple union select statement

Ans: 

Select * from (

Select 1 as id, 'x' as name
Union all
Select 2, y
Union all
Select 3,z
)order by id desc


If you are searching life partner. your searching end with kpmarriage.com. now kpmarriage.com offer free matrimonial website which offer free message, free chat, free view contact information. so register here : kpmarriage.com- Free matrimonial website