type of loops in sql server?

后端 未结 1 930
南笙
南笙 2020-12-20 02:38

Please tell me the all kind of loops that we can use in SQL Server 2008. Example of each would be good.

相关标签:
1条回答
  • 2020-12-20 03:22

    You should avoid loops when you can, try to find a set based approach. You'll get more performance that way.

    Here's an article describing why:

    http://www.techrepublic.com/blog/datacenter/avoiding-cursors-with-sql-server-2005/412

    If you really need loops:

    http://www.techrepublic.com/blog/datacenter/comparing-cursor-vs-while-loop-performance-in-sql-server-2008/1741

    0 讨论(0)
提交回复
热议问题