遍历表行的最佳方法是什么? [英] What is the best way to loop over a table's rows?
本文介绍了遍历表行的最佳方法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在 SQL Server 2008 R2 中循环访问数据库表的行的最佳方法是什么?
What is the best way to loop over a database table's rows in SQL Server 2008 R2?
我正在寻找与编写 foreach ( ) 非常相似并且非常高效的东西.
I am looking for something which is fairly similar to writing foreach ( ) and quite performant.
谢谢
推荐答案
最佳性能:不要遍历表的行.使用基于集合的操作.
Best performing: don't loop over a table's rows. Use set-based operations.
这篇关于遍历表行的最佳方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文