7
I have 3 tables
Tb_contratocotista:
Tb_contract:
Tb_stakeholder:
I would like to relate the values of the table Tb_contract with Tb_stakeholder, but the way I got it only returns the result of Tb_contract. What am I missing ?
SELECT * FROM TB_Contrato
INNER JOIN (SELECT id_contrato FROM TB_Cotista
INNER JOIN TB_ContratoCotista
ON TB_Cotista.id_cotista = TB_ContratoCotista.id_cotista) AS VAI
ON TB_Contrato.id_contrato= VAI.id_contrato
Perfect, I was trying to make it easier than I imagined.
– Eduardo F. Santos