0

When oracle executes a delete sql(with no where clause), it locks the whole table. So while the data is getting deleted from a table by a particular user session and if during that time period, will oracle allow any other user sessions to read data from the same table as the table is being locked?

delete from tran_records;

Will there be any difference in behaviour for the above scenario in optimistic and pessimistic locking?

Reena Upadhyay
  • 1,977
  • 20
  • 35

1 Answers1

0

Readers are never (b)locked, so - yes, select will work, that user will see all data in the table UNTIL delete operation is committed. Then nobody will see anything as there'll be no data in the table (not talking about flashback here).

Littlefoot
  • 131,892
  • 15
  • 35
  • 57