【发布时间】:2009-01-13 00:47:59
【问题描述】:
如何将 table1 列引用到表 2 中的 2 列
我创建了一个包含 50 行的表“State”
试图在“Wedding”表中关联(weddingState,contactState)
这是我创建的语句,但它只正确地加入了顶部 WeddingState - 似乎并不关心它下面的 INNER Join...
选择 *
来自婚礼
INNER JOIN 状态为 s1 ON 婚礼。WeddingState = s1.StateId //婚姻状态
INNER JOIN 状态为 s2 ON Weddings.ContactState = s2.StateId //新娘的联系状态
WHERE 婚礼.weddingid="094829292"
【问题讨论】:
-
嗯?刚刚发生了什么?