Forums - C# Corner

Forum guidelines

Joining 3 tables and it is duplicating

Apr 15 2019 5:16 PM
SELECT gr.Name as GroupName,gr.Id as GroupId
FROM SpecificationAttribute sa
INNER JOIN SpecificationGroup gr
on SpecAtr.GroupId = gr.Id
left JOIN CategoryAttribute as cat on cat.SpecificationAttributeId = SpecAtr.Id
 
 the rows are duplicating 
so gr.Id is prymary key SpecAtr.Id is primary and cat.SpecificationAttributeId is foreignkey
 
pleas help me 

Answers (4)