Good afternoon, I'm a beginner in the SQL language, and I'm wondering how to return the values of the foreign keys in a N: N relationship, for example, return the product name and part name. Thank you in advance.
I believe you can use something like this:
select lp.idProduto, pd.nome_produto, lp.[idPeças] , pc.[nome_peça]
from [lista_peça] lp inner join produto pd on pd.idProduto = lp.idProduto
inner join [Peças] pc on pc.[idPeças] = lp.[idPeças]
But I strongly advise against using special characters in tables and fields.
Abs.