TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Interviews
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
.NET
ADO.NET
Android
ASP.NET
C#
Databases & DBA
Design Patterns & Practices
Java
Learn iOS Programming
OOP/OOD
SharePoint
Software Testing
Web Development
WPF
View All
Where you will use the cursor in the database ?
By
BHOOPENDRA NATH PANDEY
in
SQL Server
on
Aug 20
2009
0
4.3k
1
Post Your Answer
Submit
Jul, 2010
29
Cursor is a variable which stores the results returned by a query.
We use cursor in order to perform a row by row operation on that result set.
Using cursors we can do any kind of manipulations for that result set.
For ex:
Consider a table Salary(empid, deptid, salary)
If you decided to increase the salaries of employees % wise depending upon their salary, we need to go for row by row operations to calculate the percentage growth value.
One possible way is to use cursor here.
There are many other alternate ways also
Prefer not to use cursors frequently ... as it degrades the performance
Thank you
0
Most Popular Job Functions
Developer (2375)
Programmer (1288)
Sr. Developer (826)
Sr. Programmer (449)
Fresher (398)
Tech Lead (376)
DBA (244)
Team Lead (187)
Project Lead (83)
Architect (27)
View All
MOST LIKED QUESTIONS
Why do you want to leave your current company?
What are the advantages of using REST in Web API?
What is ASP.NET Core?
How to iterate through ArrayList in jQuery?
What is the difference between TempData keep() and peek() function?
A class provides a default constructor for me. I write a constructor that takes a string as...
Can multiple catch blocks be executed in a C# program?
what is Sealed class
What were your responsibilities in your previous job ?
What Operating Systems Node.js Supports