SQL Inner Join Returns WAY More Rows Than Expected

后端 未结 2 655
悲&欢浪女
悲&欢浪女 2021-01-25 09:54

The following query returns >7000 rows when each table only has 340 rows.

SELECT Config.Spec, TempTable.Spec FROM Confg INNER JOIN TempTable on Config.Spec = Tem         


        
2条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-25 10:05

    If there is more than one row with the same Spec value in TempTable for the same Spec value in Confg, then you will get duplicate rows, and vice versa.

提交回复
热议问题