Click here to Skip to main content
15,888,984 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Table temp

ID Status
1 completed
2 approved
3 paid
4 cancel
5 approved
6 paid

I want to display above recored as per bellow table without using union.because this is client requirement, so please provide help for this.

Table temp

ID Status
1 completed
2 approved
5 approved
3 paid
6 paid
4 cancel
Posted

1 solution

You need to use an ORDER BY clause along with your SELECT query.
See Order By[^].
 
Share this answer
 
v2
Comments
amitthakkar1987 15-Jul-11 2:30am    
order by will display record as per alphabatically not as per my requiredment
amitthakkar1987 15-Jul-11 2:31am    
how it possible by using orderby please give me query for this

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900