带有游标稳定隔离的阅读器要求当前取得的行上有一个共享锁定。这个操作确保,在当前用户取回一个新行之前,其他用户不能更新该行。
图: 为游标稳定性加上的锁定
set isolation to cursor stability declare cursor for SELECT * FROM customer open the cursor while there are more rows fetch a row do work end while close the cursor
如果不使用游标取得数据,“游标稳定”隔离就与“已落实读取”的行为一致。 实际上没有加上锁定。