你的位置:首页 > 数据库

[数据库]我想知道为啥会产生两条相同的班级


我执行下边的sql语句

      SELECT                   ti.id IndustryId,                  ti.ChineseName IndustryName,                  tcc.Id ClassId,                  tcc.Name ClassName,                  tcc.OriginalImgPath ClassImg,                  tcc.Price ClassPrice                FROM                  T_Course tc                   LEFT JOIN T_CourseClass tcc ON tcc.Id = tc.ClassId                  LEFT JOIN T_CourseSubject tcs ON tcs.Id = tc.CourseSubjectId                  LEFT JOIN T_Category tca ON tcs.CategoryId=tca.Id                   LEFT JOIN T_Industry ti ON tca.IndustryId=ti.Id                   LEFT JOIN M_TrainingInstitutionIndustry mtii ON ti.Id=mtii.IndustryId                 WHERE                  tcc.IsDel=0 AND tcc.IsUsed=1 AND tcc.TrainingInstitutionId= mtii.TrainingInstitutionId                  AND tca.isDel=0                  AND ti.IsDel=0 AND ti.IsUsed=1                  AND mtii.IsDel=0 AND mtii.IsUsed=1                  AND mtii.TrainingInstitutionId=1                ORDER BY tcc.CreateTime DESC

得到下面结果

谁能告诉我那一步没有去重吗?