如果我们应该避免使用游标,那么为什么它们会出现在SQL中? [英] If we should avoid cursor then why they are present in SQL?

查看:102
本文介绍了如果我们应该避免使用游标,那么为什么它们会出现在SQL中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的朋友,

我有一个问题:到处都有我们应该避免使用游标的原因,然后为什么它们也出现在SQL中?

那他们有什么意义呢?

关于

Dear Friends,

I have a question that; everywhere it is written that we should avoid cursors then why they are present in SQL?

What significance they hold then?

Regards

推荐答案

参考:

在某些情况下,您必须一次处理一行,有时一个简单的循环(尽管如此)无法帮助您-在那种(罕见)的情况下,您必须使用游标...
There are cases when you have to process a row at a time, and there are cases when a simple loop (while or such) can''t help you - in that (rare) cases you have to use a cursor...


这篇关于如果我们应该避免使用游标,那么为什么它们会出现在SQL中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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