How to write SQL putting subquery in output
The title may not be clear but here is what I am trying to achieve. I have a People table (irrelevant columns omitted):
PersonID int
Name varchar(32)
PartnerID int
Where PartnerID revers to another individual in the People table. I would like a query like this:
SELECT Name+PartnerName FROM People;
I know how to get the Partner name but I don’t know to get it into the output.
The title may not be clear but here is what I am trying to achieve. I have a People table (irrelevant columns omitted): PersonID int
Name varchar(32)
PartnerID intWhere PartnerID revers to another individual in the People table. I would like a query like this:SELECT Name+PartnerName FROM People;I know how to get the Partner name but I don’t know to get it into the output. Read More