Posted On: Mar 16, 2020
For an application that needs row-level locks, Firebird offers it in its SELECT statement. The WITH LOCK feature provides a limited explicit pessimistic locking capability.
//syntax for with lock feature SELECT ... FROM single_table [WHERE ...] [FOR UPDATE [OF ...]] [WITH LOCK]
The WITH LOCK feature secures a lock on the selected rows so any other transactions can be prevented from writing or reading to any of these locked rows until the transaction ends.
Never Miss an Articles from us.