为什么在sql server中使用游标? [英] Why cursor is used in sql server ?

查看:155
本文介绍了为什么在sql server中使用游标?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





请给我打电话

使用光标有什么需要?

什么是使用游标的优势?

Hi,

Please tel me
What is the need for using cursor?
what is the advantage of using cursor?

推荐答案





光标基本上是一个指针,它可以帮助我们遍历指定记录集的行。有关游标的更多信息,请参阅以下文章。



游标的SQL Server基础知识 [ ^ ]

游标 [ ^ ]

SQL Server不同类型的游标 [ ^ ]

SQL Server中的游标是什么? [ ^ ]

游标:概述 [ ^ ]



希望它有所帮助。
Hi,

Cursor is basically a pointer which help us to iterate through the rows of the specified record set. refer below articles for more on cursors.

SQL Server Basics of Cursors[^]
Cursors[^]
SQL Server Different Types of Cursors[^]
What is cursor in SQL Server?[^]
Cursors: An Overview[^]

hope it helps.


hi,



光标只是一个for循环概念。当您返回一些记录集并使用相同的过程执行功能时。作为基本建议不要使用光标。它会产生很多性能问题。使用游标时执行时间越来越多。主要缺点是它在服务器上分配了大量内存。更好地使用临时表概念来避免游标。





问候,

Prakash.T


Cursor is nothing but a for loop concept. While you returning some recordset and doing functionality with the same procedure. As the basic advise dont use cursor. It creates lot of performance issue. Executing time is getting more while used cursors. Main disadvantage is it allocates lot of memory on server. Better use temp table concept to avoid cursors.


Regards,
Prakash.T


这可能帮助你 - > http://bradsruminations.blogspot.in/2010/05/ [ ^ ]
This might help you -> http://bradsruminations.blogspot.in/2010/05/[^]


这篇关于为什么在sql server中使用游标?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆