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)。
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 查询来构造可更新的游标,方法为根据先前的描述使用 FOR UPDATE 子句。
应用推荐