Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何在没有最终表具有主键的情况下在 SQL Server 中使用合并命令合并阶段表和最终表?
我应该在合并语句中比较 ON 之后的所有列字段吗?
MERGE不需要显式主键。您应该能够使用任何可以唯一标识行的条件来做到这一点。(这引出了一个问题——为什么你的表没有主键?)
MERGE