How to display results from 2 queries side by side

I need to display results of 2 queries side by side as follows:
Result of QueryA and Result of QueryB
CodeA CountA CodeB CountB

1 1 1 2
2 3 2 7
3 10 3 4

Thank you

is there any relationship between the left and the right sides?

There is no relationship but now I found the solution. This is the example I followed:
SELECT t1.FirstName1, t1.LastName1, t2.FirstName2, t2.LastName2
ROW_NUMBER() OVER (ORDER BY FirstName1) 'RowNumber'
FROM table1
) AS t1
ROW_NUMBER() OVER (ORDER BY FirstName2) 'RowNumber'
FROM table2
) AS t2
ON t1.RowNumber = t2.RowNumber

Sorry. I am looking at this a bit different. Are you wanting to display the results in the same query return? Or, would you like to display the information side by side in SSMS?

When you have two tabs open in ssms. Right click a tab and the below options appear. If this does not help, sorry about that! I thought it was cool though!

I have already resolved this issue, but thanks for asking.

It would be nice to know how you solved or what you did to solve you problem.

What the O/P posted earlier, as a solution, looked interesting to me - I wouldn't have thought to do it that way :slight_smile: