The following LOCKING clause can be used to select data from the employee table while it is being modified:
LOCKING TABLE personnel.employee FOR ACCESS SELECT name, salary FROM employee WHERE salary < 25000 ;
The query results may:
- Return rows whose data can be updated or deleted an instant later by a concurrent operation initiated by another user who has obtained a WRITE lock.
- Omit rows that are undergoing a concurrent insert operation.
- Include rows that were not permanently inserted in the base table, because a transaction inserting the new rows was aborted and the new rows were backed out.