Blog
-
FIREBIRD SET TRANSACTION
-
Example:
SET TRANSACTION [NAME
hostvar] [READ WRITE | READ ONLY] [ [ISOLATION LEVEL] { SNAPSHOT [TABLE STABILITY] | READ COMMITTED [[NO] RECORD_VERSION] } ] [WAIT | NO WAIT] [LOCK TIMEOUTseconds] [NO AUTO UNDO] [IGNORE LIMBO] [RESERVING<tables>| USING<dbhandles>]<tables>::=<table_spec>[,<table_spec>...]<table_spec>::=tablename[,tablename…] [FOR [SHARED | PROTECTED] {READ | WRITE}]<dbhandles>::=dbhandle[,dbhandle…]
COMMIT;
SET TRANSACTION READ ONLY NAME ‘Toronto’;
SELECT product_id, quantity_on_hand FROM inventories
WHERE warehouse_id = 5;
COMMIT;
The first COMMIT statement ensures that SET TRANSACTION is the first statement in the transaction. The last COMMIT statement does not actually make permanent any changes to the database. It simply ends the read-only transaction.

