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.
只是为了加快速度:您可以在创建 #lastname 表后添加以下内容。
Delete from #lastname where CorrectLastName = incorrectLastName
我认为,如果您只有几个不正确的姓氏,这将加快速度。
您还可以尝试避免创建表#lastnameupdate。 因为使用子查询代替你可以做同样的事情。 这也应该加快整体速度。