Answer the question
In order to leave comments, you need to log in
How to merge query result columns in MSSQL?
Good afternoon, please tell me how to write a query in MSSQL, which will combine the results of others. For example, I want the following three queries to appear in one line with columns a,b,c and, accordingly, the values in them 1,2,3
select '1' as 'a'
select '2' as 'b'
select '3' as 'c'
Answer the question
In order to leave comments, you need to log in
PIVOT .
PIVOT / Sudo Null IT News
Or you need:
SELECT (select '1') as [a], (select '2') as [b], (select '3') as [c]
?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question