sql server 2008 - how to combine the two queries sql? -
good day.
i have 2 sql query:
first:
select name tableone city='3452' , firm='49581' , service='2' group name
second:
select name tabletwo city='3452' , firm='49581' , service='2' group name
tell me please how combine 2 queries sql , select name (with group name) 2 tables ?
you can use union all
http://sqltutorials.blogspot.com/2007/06/sql-union-all.html
select name ( select name tableone city='3452' , firm='49581' , service='2' union select name tabletwo city='3452' , firm='49581' , service='2' ) x group name
Comments
Post a Comment