Click here to Skip to main content
15,889,877 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
select a,b,c from table1 union select a,b,c from table2.
in sql I am using the UNION operator to select output from two various tables. i need output from the 1st table solution to come before those from the second table.
i want get result to table1 after table2
Posted
Updated 9-Jul-14 21:38pm
v2
Comments
Thanks7872 10-Jul-14 2:56am    
Why?
arvind mepani 10-Jul-14 2:59am    
Provide proper explanation for your problem. Share table query you want to combine table.

1 solution

Hi,

Whatever i understand from your question, you can try this for getting required output.

SQL
SELECT 1,....(first table query)
union
SELECT 2,....(second table query)
Order by 1


Hope this will help you.
 
Share this answer
 

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