The naive approach USES a cursor to scan the table and execute a positioned update statement for each row.
初级的方法是使用一个游标对表进行扫描,并为每一行执行一个定位的更新语句。
For example, you can loop through projects and update their statuses based on the current cursor position (see Listing 5).
例如,您可以遍历项目,并基于当前游标位置更新其状态(参见清单5)。
All of this is fine, but the real value of directly manipulating a cursor is the ability to update the database at a particular position.
上述这些游标都很有用,但是,直接操纵游标的实际价值在于在特定位置更新数据库的能力。
When it detects a potential update target, the federated system avoids using the block fetch feature in order to maintain the remote cursor position.
当检测到一个潜在的更新目标时,联邦系统避免使用块读取特性,以维护远程游标的位置。
The key is that the SQL statement in the prepared statement references the current position of the cursor, so you can execute it multiple times and update different rows.
关键是准备好的语句中的sql语句会引用游标的当前位置,所以您可以多次执行它,并更新不同的行。
When you've found the desired row within your cursor, you can issue the appropriate UPDATE operation.
当您在游标内找到了所需行后,您可以执行相应的UPDATE操作。
The next step is to execute the appropriate SQL query to construct your updateable cursor, which requires using the FOR UPDATE clause as described earlier.
下一步是执行适当的SQL查询来构造可更新的游标,方法为根据先前的描述使用 FORUPDATE子句。
Release the row locks so that other applications can SELECT, INSERT, UPDATE, and DELETE from the table (for example, use isolation level cursor stability or uncommitted read).
释放行锁,以便其他应用程序可以对表执行SELECT、INSERT、UPDATE和DELETE(例如,使用游标稳定性(curs or stability)隔离级别或未提交读(uncommitted read)隔离级别)。
The cursor library emulates positioned update support by doing a searched update on the unchanging fields.
资料指标程序库会在未变更栏位上制作一个已查询的更新,以模拟定位更新支援。
The cursor library emulates positioned update support by doing a searched update on the unchanging fields.
资料指标程序库会在未变更栏位上制作一个已查询的更新,以模拟定位更新支援。
应用推荐