How firebird handle row-level locks?

devquora
devquora

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.

    Related Questions

    Please Login or Register to leave a response.

    Related Questions

    Firebird Interview Questions

    What is Firebird?

    Firebird is a relational database that offers many ANSI SQL standards features. It has support for Linux, Windows, and a variety of UNIX platforms. It offers excellent co...

    Firebird Interview Questions

    Enlist few advantages of Firebird?

    Some of the advantages of using a Firebird are,It can be used free of cost. Firebird is a powerful and technologically developed product. It is easily configurable than the MS SQL Server. It ha...

    Firebird Interview Questions

    Explain generators in Firebird?

    Generators are a thread-safe integer count which lives inside a Firebird database. It can be created easily by just giving it a name. After creating a generator, you can increase, decrease, or get the...