Can a cursor be updated? If yes, how you can protect which columns are updated?
Answer Posted / Indrajeet
No, a cursor in SQL Server cannot be directly updated. To perform updates based on the data read from a cursor, you would need to materialize (i.e., save) the cursor's data into a temporary table or table variable and then update the original table using an UPDATE statement.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What are the kinds of subquery?
Can one drop a column from a table?
Can we do dml on views?
What is temporary table in sql server? Why we use temp table?
If you're given a raw data table, how would perform etl (extract, transform, load) with sql to obtain the data in a desired format?
Is there any performance difference between if exists (select null from table) and if exists (select 1 from table)?
Explain “row_number()” in sql server with an example?
explain different types of backups avaialabe in sql server? Given a particular scenario, how would you go about choosing a backup plan? : Sql server database administration
What is a coalesce function?
When should you use an instead of trigger?
What is the primary use of the model database?
How to rebuild the master database?
How to connect php with different port numbers?
What is standby servers? Explain types of standby servers.
Explain system functions or built-in functions? What are different types of system functions?