FOR UPDATE WITH RS to do DB2 row locking
To lock in Oracle, use FOR UPDATE.
In DB2, use FOR UPDATE WITH RS.
Here is an example
SELECT * FROM ~ FOR UPDATE WITH RS
In the System i Navigator, the statement FOR UPDATE WITH RS will be locked.
To check for locking, right click on “Table” and select “Locked Rows” to see if rows are locked.
To release the row lock, execute ROLLBACK from “Execute SQL Script” in “Execute SQL Script”.
ROLLBACK;
コメント