Updating Keyset-driven Cursors
To update results, Microsoft SQL Server 2005 Compact Edition (SQL Server Compact Edition) must have sufficient information to uniquely identify the row in the table.
The following table summarizes specific instances in which you might or might not be able to update results obtained through an updatable keyset-driven cursor.
Query | Can results be updated? |
---|---|
Query based on multiple tables which are not joined |
No |
Query based on system views |
No |
Query based on tables joined with a one-to-one relationship |
Yes. Columns from both sides can be updated. However, join tables cannot be updated. |
Query based on tables joined with a one-to-many relationship |
Yes. You can update columns on the many side, except for join and identity columns. |
Query based on tables in which there is a many-to-many relationship |
No |
Aggregate query |
No |
Query that includes the DISTINCT keyword to exclude duplicate rows |
No |
Union queries and outer join queries |
No |
See Also
Concepts
Types of Cursors
Choosing a Cursor Type
Cursors and Locking
Implicit Cursor Conversions