Select from 2 Tables with output on 1 row

Hi experts, I want to:
select a.Name from Table1 a, b.City from Table 2 b

and have the output of Name and City be on the same row.

Can someone help with the syntax please? Thanks

I suspect there may be more to this, but, for now:


SELECT 
    (SELECT a.Name FROM dbo.Table1 a) AS Name,
    (SELECT b.City FROM dbo.Table2 b) AS City
1 Like

you need to show us your table schema, sample data with the expected result. Otherwise, we are just making guesses

1 Like