Question

SQL Assignment: Discuss why and when cursors could be used.

SQL Assignment:

Discuss why and when cursors could be used.

Homework Answers

Answer #1

Cursors are used by database programmers to process individual rows returned by database system queries. Cursors enable manipulation of whole result sets at once.

In SQL procedures, a cursor makes it possible to define a result set (a set of data rows) and perform complex logic on a row by row basis. By using the same mechanics, a SQL procedure can also define a result set and return it directly to the caller of the SQL procedure or to a client application.

when to use cursor

There are some conditions when we want to get record from one table and need to insert into another with performing some logic or some conditions .For example if we want to get value from one table row by row and need to perform some logic over that and update /insert into another table then we can use cursors. Cursor basically works as for/While loop.

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Write a paragraph to discuss why understanding SQL is important for understanding data security issues (Hint:...
Write a paragraph to discuss why understanding SQL is important for understanding data security issues (Hint: discuss SQL Injection)
Purpose: The purpose of this assignment is to provide an opportunity for you to write SQL...
Purpose: The purpose of this assignment is to provide an opportunity for you to write SQL statements to create tables and insert data into tables. Skills: Learn and practice the techniques of writing SQL statements using SQL Server Management Studio(SSMS).   Knowledge: By doing this assignment you will learn to use SSMS and write SQL statements to create new tables and insert data into the tables. Tasks: Use the following figure for the tasks below: [15 points] Write SQL statements to...
Assess and discuss the "future of databases". In particular, emphasize the future role of both SQL...
Assess and discuss the "future of databases". In particular, emphasize the future role of both SQL and non-SQL technologies. Based on your research do you think SQL will be the dominant database language 10 years from now? Why/why not?
Discuss a specific situation where clustering is used, or could be used, in telecommunications. Which clustering...
Discuss a specific situation where clustering is used, or could be used, in telecommunications. Which clustering method is being used or would be appropriate and why?
Discuss the techniques used during de-escalation. Explain why these techniques are used and when they may...
Discuss the techniques used during de-escalation. Explain why these techniques are used and when they may not work as expected.​
Why should passwords be applied to services individually and uniquely when using SQL database.
Why should passwords be applied to services individually and uniquely when using SQL database.
Review the sample assignment below and identify at least one technology tool that could be used...
Review the sample assignment below and identify at least one technology tool that could be used with it. Remember that the focus of this assignment is learning through technology, not the technology itself. Sample Assignment: PSYCH 100 – Introduction to Psychology In groups of three to five students each, create a poster that demonstrates the various learning theories we have discussed this week. Your group’s poster should include the cognitive learning theory, behavioral learning theory, and social learning theory. Then,...
Even when a computer software system is used for management of the practice’s finances, discuss why...
Even when a computer software system is used for management of the practice’s finances, discuss why following the bookkeeping guidelines for a manual system still has merit.
What methodologies could you use to improve the performance of a SQL query?
What methodologies could you use to improve the performance of a SQL query?
Class SQL performs automatically; discuss at least two risks inherent in letting SQL Server to perform...
Class SQL performs automatically; discuss at least two risks inherent in letting SQL Server to perform conversion. In your opinion what is the best approach for insuring that any data type conversion will work all the time as expected? Provide a vivid example to summarize your written detail explanation.
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT